mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Make sure pendsv is not masked before stop/exec script.
This commit is contained in:
parent
80d05fdbc3
commit
1ced9d1507
@ -209,6 +209,10 @@ void usbdbg_data_out(void *buffer, int length)
|
|||||||
|
|
||||||
// Clear interrupt traceback
|
// Clear interrupt traceback
|
||||||
mp_obj_exception_clear_traceback(mp_const_ide_interrupt);
|
mp_obj_exception_clear_traceback(mp_const_ide_interrupt);
|
||||||
|
|
||||||
|
// Remove the BASEPRI masking (if any)
|
||||||
|
__set_BASEPRI(0);
|
||||||
|
|
||||||
// Interrupt running REPL
|
// Interrupt running REPL
|
||||||
// Note: setting pendsv explicitly here because the VM is probably
|
// Note: setting pendsv explicitly here because the VM is probably
|
||||||
// waiting in REPL and the soft interrupt flag will not be checked.
|
// waiting in REPL and the soft interrupt flag will not be checked.
|
||||||
@ -327,6 +331,10 @@ void usbdbg_control(void *buffer, uint8_t request, uint32_t length)
|
|||||||
|
|
||||||
// interrupt running code by raising an exception
|
// interrupt running code by raising an exception
|
||||||
mp_obj_exception_clear_traceback(mp_const_ide_interrupt);
|
mp_obj_exception_clear_traceback(mp_const_ide_interrupt);
|
||||||
|
|
||||||
|
// Remove the BASEPRI masking (if any)
|
||||||
|
__set_BASEPRI(0);
|
||||||
|
|
||||||
pendsv_nlr_jump(mp_const_ide_interrupt);
|
pendsv_nlr_jump(mp_const_ide_interrupt);
|
||||||
}
|
}
|
||||||
cmd = USBDBG_NONE;
|
cmd = USBDBG_NONE;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user