diff options
author | Paul Fertser <fercerpav@gmail.com> | 2014-11-02 15:16:13 +0300 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2015-01-09 08:36:52 +0000 |
commit | 9f6d4d1302e778a4f57033f3d86c757718f2ca9f (patch) | |
tree | adcf9dbea6778677d1a5db94054a788596bae9cb /src/target/arm_adi_v5.h | |
parent | c120fb6d893a89d9805d0b4d6083e47810143f2d (diff) |
swd: handle various failure conditions
When communication with target fails for whatever reason, it makes
sense to do JTAG-to-SWD (in case the target got power-cycled or the
DAP method was reset anyhow), SWD line reset sequence (part of
JTAG-to-SWD already) and the mandatory IDCODE read. Schedule that to
be performed on the next poll.
Fix the return values for ftdi and jlink drivers to be consistent with
OpenOCD error codes and remove ad-hoc calls to perform DAP method
switching (as it's now done from the upper layer automatically).
Change-Id: Ie18797d4ce7ac43d8249f8f81f1064a2424e02be
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2371
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Mateusz Manowiecki <segmentation@fault.pl>
Diffstat (limited to 'src/target/arm_adi_v5.h')
-rw-r--r-- | src/target/arm_adi_v5.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h index dee3117e..8d126086 100644 --- a/src/target/arm_adi_v5.h +++ b/src/target/arm_adi_v5.h @@ -213,6 +213,12 @@ struct adiv5_dap { * the AHB-AP has strange byte ordering these processors, and we need to * swizzle appropriately. */ bool ti_be_32_quirks; + + /** + * Signals that an attempt to reestablish communication afresh + * should be performed before the next access. + */ + bool do_reconnect; }; /** |