This is an automated email from Gerrit. Michele Bisogno ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/6278
-- gerrit commit 97620e43988f31fa625109e1bc368fc7095fdd28 Author: micbis <[email protected]> Date: Wed May 26 19:11:05 2021 +0200 target/arm_adi_v5: 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 <[email protected]> diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c index 6dede97..3523b20 100644 --- a/src/target/adi_v5_jtag.c +++ b/src/target/adi_v5_jtag.c @@ -574,6 +574,15 @@ static int jtagdp_overrun_check(struct adiv5_dap *dap) retval = ERROR_JTAG_DEVICE_ERROR; break; } + if (el->ack == JTAG_ACK_WAIT) { + LOG_INFO("DAP transaction stalled (WAIT) - slowing down"); + /* 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) + goto done; + } } while (timeval_ms() - time_now < 1000); if (retval == ERROR_OK) { --
