From: OpenOCD-Gerrit <ope...@us...> - 2022-10-08 08:53:25
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 1f84f34850de6dde354bfeb41bb1e7bf5d3fa6a0 (commit) from f65d1da01356e21e07e6c638d58f7c6d09738aa6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1f84f34850de6dde354bfeb41bb1e7bf5d3fa6a0 Author: Tomas Vanek <va...@fb...> Date: Wed Sep 28 23:32:00 2022 +0200 target/hla_target: try to re-examine under reset in hl_assert_reset() An application often idling in real sleep mode may make a Cortex-M target hard to access as CPU clock are gated and debug requests are responded by WAIT ack. Try to examine the target under reset as the last resort. Change-Id: I7c3de39fb1e6c23b76e2a0a85ab75f23aac94c4d Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/7229 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/hla_target.c b/src/target/hla_target.c index 33126d65a..8c35a90cb 100644 --- a/src/target/hla_target.c +++ b/src/target/hla_target.c @@ -347,6 +347,13 @@ static int hl_assert_reset(struct target *target) adapter->layout->api->write_debug_reg(adapter->handle, DCB_DHCSR, DBGKEY|C_DEBUGEN); + if (!target_was_examined(target) && !target->defer_examine + && srst_asserted && res == ERROR_OK) { + /* If the target is not examined, now under reset it is good time to retry examination */ + LOG_TARGET_DEBUG(target, "Trying to re-examine under reset"); + target_examine_one(target); + } + /* only set vector catch if halt is requested */ if (target->reset_halt) adapter->layout->api->write_debug_reg(adapter->handle, DCB_DEMCR, TRCENA|VC_CORERESET); ----------------------------------------------------------------------- Summary of changes: src/target/hla_target.c | 7 +++++++ 1 file changed, 7 insertions(+) hooks/post-receive -- Main OpenOCD repository |