From: Paul Fertser Date: Mon, 9 Mar 2015 15:55:03 +0000 (+0300) Subject: jtag/core: honour SRST timings in SWD mode X-Git-Tag: v0.9.0-rc1~48 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ea85ed98beb909d9295a7b15ceb99e067082e31f;p=openocd jtag/core: honour SRST timings in SWD mode Since SWD is currently abusing the JTAG command queue for reset and sleep handling (and all other operations are performed in a different way), sleep needs to be forced explicitly to ensure correct timings. Change-Id: I5b0da6cbb7d0560154e4077b261aa6828cefc892 Signed-off-by: Paul Fertser Reviewed-on: http://openocd.zylin.com/2591 Tested-by: jenkins Reviewed-by: Tomas Vanek Reviewed-by: Spencer Oliver --- diff --git a/src/jtag/core.c b/src/jtag/core.c index 1b1106f1..74c2731c 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -649,6 +649,12 @@ void swd_add_reset(int req_srst) if (adapter_nsrst_delay) jtag_add_sleep(adapter_nsrst_delay * 1000); } + + retval = jtag_execute_queue(); + if (retval != ERROR_OK) { + LOG_ERROR("SRST timings error"); + return; + } } }