diff options
author | micbis <michele.bisogno.ct@renesas.com> | 2021-05-26 19:11:05 +0200 |
---|---|---|
committer | Matthias Welwarsky <matthias@welwarsky.de> | 2021-05-31 20:56:33 +0100 |
commit | b40dc09dd9e05497bf956ca91f7153aa34b24854 (patch) | |
tree | a39e3e6ebee614d2f5253caef34c3eb892c53a46 /src | |
parent | 3b4e40120bc9c56442d1e177ecfbc8c4faa0ac7f (diff) | |
download | riscv-openocd-b40dc09dd9e05497bf956ca91f7153aa34b24854.zip riscv-openocd-b40dc09dd9e05497bf956ca91f7153aa34b24854.tar.gz riscv-openocd-b40dc09dd9e05497bf956ca91f7153aa34b24854.tar.bz2 |
target/arm_adi_v5: Fix clear sticky overrun flag during replay of commands
When a WAIT occurs the commands after the WAIT are replayed and the
STICKYORUN is cleared. However if another WAIT occurs during the
command replay, the command itself is resent but the STICKYORUN bit
shall also be cleared. If this is not done, the MEM-AP hangs.
Change-Id: I14e8340cd5d8f58f4de31509da96cfa2ecb630d1
Signed-off-by: micbis <michele.bisogno.ct@renesas.com>
Reviewed-on: http://openocd.zylin.com/6278
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/target/adi_v5_jtag.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c index 6dede97..239253d 100644 --- a/src/target/adi_v5_jtag.c +++ b/src/target/adi_v5_jtag.c @@ -574,6 +574,13 @@ static int jtagdp_overrun_check(struct adiv5_dap *dap) retval = ERROR_JTAG_DEVICE_ERROR; break; } + LOG_INFO("DAP transaction stalled during replay (WAIT) - resending"); + /* clear the sticky overrun condition */ + retval = adi_jtag_scan_inout_check_u32(dap, JTAG_DP_DPACC, + DP_CTRL_STAT, DPAP_WRITE, + dap->dp_ctrl_stat | SSTICKYORUN, NULL, 0); + if (retval != ERROR_OK) + break; } while (timeval_ms() - time_now < 1000); if (retval == ERROR_OK) { |