target/arm_adi_v5: Fix clear sticky overrun flag during replay of commands 78/6278/7
authormicbis <michele.bisogno.ct@renesas.com>
Wed, 26 May 2021 17:11:05 +0000 (19:11 +0200)
committerMatthias Welwarsky <matthias@welwarsky.de>
Mon, 31 May 2021 19:56:33 +0000 (20:56 +0100)
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>
src/target/adi_v5_jtag.c

index 6dede972c9b8720805bc6e46468fbe00188ae992..239253d2016dfa00fa8c86614ee2a70348a5fdda 100644 (file)
@@ -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) {

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)