Disable interrupt in debug state
@@ -585,7 +585,11 @@ static uint8_t swd_write_debug_state(DEBUG_STATE *state)
return 0;
}
- if (!swd_write_word(DBG_HCSR, DBGKEY | C_DEBUGEN)) {
+ if (!swd_write_word(DBG_HCSR, DBGKEY | C_DEBUGEN | C_MASKINTS | C_HALT)) {
+ return 0;
+ }
+
+ if (!swd_write_word(DBG_HCSR, DBGKEY | C_DEBUGEN | C_MASKINTS)) {
return 0;
}
