diff options
| author | Damien George | 2019-07-04 10:49:51 +1000 |
|---|---|---|
| committer | Damien George | 2019-07-04 10:49:51 +1000 |
| commit | afb2e9dd942a77125d4447a96def5be48fee19af (patch) | |
| tree | d67e5377fdc6d2fb2bf8ab4d34333e74fad9805a | |
| parent | 04da8864e5113e8ef8d4b017bb277b145cfcf34f (diff) | |
stm32/modmachine: Disable IRQs before entering bootloader.
To make sure that the code that enters the bootloader is not interrupted.
| -rw-r--r-- | ports/stm32/modmachine.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/stm32/modmachine.c b/ports/stm32/modmachine.c index 7ea14bdcd..ba0ee2847 100644 --- a/ports/stm32/modmachine.c +++ b/ports/stm32/modmachine.c @@ -257,6 +257,8 @@ STATIC NORETURN mp_obj_t machine_bootloader(size_t n_args, const mp_obj_t *args) storage_flush(); #endif + __disable_irq(); + #if MICROPY_HW_USES_BOOTLOADER if (n_args == 0 || !mp_obj_is_true(args[0])) { // By default, with no args given, we enter the custom bootloader (mboot) |
