target/cortex_m: inform if an external reset occurs
Change-Id: I873e73012c44aac7af3b21b633bd096d8e299d07 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4840 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>log_output
parent
d0eb66f729
commit
d479020950
|
@ -510,7 +510,10 @@ static int cortex_m_poll(struct target *target)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cortex_m->dcb_dhcsr & S_RESET_ST) {
|
if (cortex_m->dcb_dhcsr & S_RESET_ST) {
|
||||||
|
if (target->state != TARGET_RESET) {
|
||||||
target->state = TARGET_RESET;
|
target->state = TARGET_RESET;
|
||||||
|
LOG_INFO("%s: external reset detected", target_name(target));
|
||||||
|
}
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue