This is an automated email from Gerrit. Kevin Yang ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/5921
-- gerrit commit 03c98e5bcc40eb7998519ecd3445a431bc070765 Author: Kevin Yang <[email protected]> Date: Wed Nov 4 10:39:29 2020 -0800 target/cortex_m: Change sleep to running state When the core is in sleep mode, the core is no longer retiring instructions. Cortext M remains in "unknown" state. This patch converts sleep mode to "running" state. Change-Id: I1e9b6c9be51fd0f1f6ce81af9b1f5f9f1f43c661 Signed-off-by: Kevin Yang <[email protected]> diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index 55664a7..8a2ae49 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -656,13 +656,9 @@ static int cortex_m_poll(struct target *target) } } - /* REVISIT when S_SLEEP is set, it's in a Sleep or DeepSleep state. - * How best to model low power modes? - */ - if (target->state == TARGET_UNKNOWN) { - /* check if processor is retiring instructions */ - if (cortex_m->dcb_dhcsr & S_RETIRE_ST) { + /* check if processor is retiring instructions or sleeping */ + if (cortex_m->dcb_dhcsr & S_RETIRE_ST || cortex_m->dcb_dhcsr & S_SLEEP) { target->state = TARGET_RUNNING; retval = ERROR_OK; } -- _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
