This is an automated email from Gerrit. Antonio Borneo ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/4677
-- gerrit commit 81578a4c70990443aa855986ff41f0b72572bff3 Author: Antonio Borneo <[email protected]> Date: Sat Sep 15 00:09:16 2018 +0200 arm_adi_v5: do not deactivate power domains when cleaning sticky errors At OpenOCD start-up the operation of cleaning sticky error ignores the status of the power domains and disables them. This abrupt disable does not follow the requirement in IHI0031 to wait for the acknowledgment on power disabled before continuing. The power domains are enabled immediately after, so it is possible that such short disable period has passed undetected. Anyway, this sequence can generate unexpected and hard-to-debug issues while OpenOCD attaches to a running target. Do not change the power domain enable bits while cleaning the sticky errors. Change-Id: I8d6da788f2dd11909792b5d6b69bc90fbe4df25d Signed-off-by: Antonio Borneo <[email protected]> diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index d9f3bd7..9711612 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -646,6 +646,7 @@ void dap_invalidate_cache(struct adiv5_dap *dap) */ int dap_dp_init(struct adiv5_dap *dap) { + uint32_t dp_ctrl_stat; int retval; LOG_DEBUG("%s", adiv5_dap_name(dap)); @@ -655,12 +656,14 @@ int dap_dp_init(struct adiv5_dap *dap) for (size_t i = 0; i < 30; i++) { /* DP initialization */ - retval = dap_dp_read_atomic(dap, DP_CTRL_STAT, NULL); + retval = dap_dp_read_atomic(dap, DP_CTRL_STAT, &dp_ctrl_stat); if (retval == ERROR_OK) break; } - retval = dap_queue_dp_write(dap, DP_CTRL_STAT, SSTICKYERR); + /* clean sticky errors, but do not deactivate power domains */ + dap->dp_ctrl_stat = dp_ctrl_stat & (CDBGPWRUPREQ | CSYSPWRUPREQ); + retval = dap_queue_dp_write(dap, DP_CTRL_STAT, dap->dp_ctrl_stat | SSTICKYERR); if (retval != ERROR_OK) return retval; -- _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
