openocd/src/jtag
Antonio Borneo 717d3af087 stlink: remove reset pulse when entering in JTAG
Until version J14 the behaviour of ST-Link was to send a reset
pulse to the target when the debug connection is started in JTAG
mode. No reset pulse is sent, instead, in SWD mode.
Version J15 introduces a new parameter to avoid the reset pulse in
JTAG mode, aligning the behaviour with SWD.

This reset from the ST-Link, if propagated to the target, prevents
attaching a running target.

Actually this reset pulse is very short (few microsecond) and can
be easily filtered out by an on-board capacitor, usually present
on the reset wire (mainly to filter the bounces of the reset
button). Moreover, most of the use cases for ST-Link are with SWD
(not with JTAG) and this has probably further masked this JTAG
specific behaviour.

OpenOCD can tolerate it but requires the flag "connect_assert_srst"
to the command "reset_config", but the flag is not present in any
configurations in folder tcl. This enforces the guess it was not
noticed due to on-board capacitors or missing connection of reset
pin or ST-Link only used in SWD; so it's safe applying this patch.

Change the default behaviour to avoid reset in JTAG at connection.
There is no need to manage the ST-Link version here, since every
parameter that is not recognized by older ST-Link is treated as
"connect in JTAG with reset pulse", keeping backward compatibility.

Change-Id: Idc97a1457279e3970fd0839cadbff22d9b0302d4
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4713
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2018-12-06 13:05:44 +00:00
..
aice nds32: Avoid detected JTAG clock 2018-07-18 21:06:51 +01:00
drivers stlink: remove reset pulse when entering in JTAG 2018-12-06 13:05:44 +00:00
hla target/armv7m_trace: Fix typo in enum 2018-07-19 10:48:58 +01:00
minidriver Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
minidummy Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
zy1000 zy1000: fix compile error with gcc 8.1.1 2018-08-01 14:32:03 +01:00
adapter.c jtag: adapter: fix indentation in handle_interface_command 2018-04-17 08:29:49 +01:00
commands.c jtag: make cmd_queue_scan_field_clone public 2018-10-16 11:58:17 +01:00
commands.h jtag: make cmd_queue_scan_field_clone public 2018-10-16 11:58:17 +01:00
core.c target/armv7m_trace: Fix typo in enum 2018-07-19 10:48:58 +01:00
driver.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
interface.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
interface.h target/armv7m_trace: Fix typo in enum 2018-07-19 10:48:58 +01:00
interfaces.c jtag/drivers: Add support for TI XDS110 debug probe 2018-05-31 13:25:16 +01:00
interfaces.h Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
jtag.h target: restructure dap support 2018-03-30 09:58:21 +01:00
Makefile.am jtag: make cmd_queue_scan_field_clone public 2018-10-16 11:58:17 +01:00
minidriver.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
startup.tcl jtag/startup.tcl: fix regression with autoselecting JTAG 2015-04-14 12:35:39 +01:00
swd.h transport: add transport_is_hla() 2018-03-20 11:48:44 +00:00
tcl.c transport: add transport_is_hla() 2018-03-20 11:48:44 +00:00
tcl.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00