stm32/modmachine: Disable IRQs before entering bootloader.
To make sure that the code that enters the bootloader is not interrupted.
This commit is contained in:
parent
04da8864e5
commit
afb2e9dd94
@ -257,6 +257,8 @@ STATIC NORETURN mp_obj_t machine_bootloader(size_t n_args, const mp_obj_t *args)
|
|||||||
storage_flush();
|
storage_flush();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
__disable_irq();
|
||||||
|
|
||||||
#if MICROPY_HW_USES_BOOTLOADER
|
#if MICROPY_HW_USES_BOOTLOADER
|
||||||
if (n_args == 0 || !mp_obj_is_true(args[0])) {
|
if (n_args == 0 || !mp_obj_is_true(args[0])) {
|
||||||
// By default, with no args given, we enter the custom bootloader (mboot)
|
// By default, with no args given, we enter the custom bootloader (mboot)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user