aboutsummaryrefslogtreecommitdiff
path: root/src/target/arm_adi_v5.h
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2021-11-11 23:28:33 +0100
committerAntonio Borneo <borneo.antonio@gmail.com>2021-12-11 17:39:58 +0000
commit68ec9d2175f3bad53cd7f1a259e54420047321d6 (patch)
treeb5081bc9411faed2e52e3cd635d087e570de3b8b /src/target/arm_adi_v5.h
parent8a448573fb2804a9abe3e0922648dbbf99224aa9 (diff)
downloadriscv-openocd-68ec9d2175f3bad53cd7f1a259e54420047321d6.zip
riscv-openocd-68ec9d2175f3bad53cd7f1a259e54420047321d6.tar.gz
riscv-openocd-68ec9d2175f3bad53cd7f1a259e54420047321d6.tar.bz2
adi_v5_swd: add jtag-to-swd through dormant
ARM IHI 0031A does not support SWJ-DP, so no switch between JTAG and SWD is considered. ARM IHI 0031B is not publicly available and it's reported as "Confidential Beta" in the history list in following doc versions. From ARM IHI 0031C the direct switch between JTAG and SWD is already deprecated in favor of passing through dormant mode. With no access to IHI 0031B we haven't info if any device strictly requires the direct switch. OpenOCD implements only the deprecated direct switch, so changing it could cause regression on devices that do not implement dormant mode. Plus, not all the adapters support dormant mode. Nevertheless there are already target devices that only allow entering in SWD by passing through dormant. Let the code try both method, alternating one tentative with the deprecated legacy direct switch, then another tentative passing through dormant, and repeat till timeout. This would work on any device that don't support dormant, on new devices that require switch through dormant and will work with adapters that don't support dormant. Change-Id: Ib8619635277d497872079a33fa4e38be9beb84a0 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6695 Tested-by: jenkins
Diffstat (limited to 'src/target/arm_adi_v5.h')
-rw-r--r--src/target/arm_adi_v5.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h
index 758cfa0..5c598f1 100644
--- a/src/target/arm_adi_v5.h
+++ b/src/target/arm_adi_v5.h
@@ -342,6 +342,11 @@ struct adiv5_dap {
bool multidrop_dp_id_valid;
/** TINSTANCE field of multidrop_targetsel has been configured */
bool multidrop_instance_id_valid;
+
+ /**
+ * Record if enter in SWD required passing through DORMANT
+ */
+ bool switch_through_dormant;
};
/**