diff options
| author | Damien George | 2017-08-23 16:58:48 +1000 |
|---|---|---|
| committer | Damien George | 2017-08-23 16:58:48 +1000 |
| commit | 49316b864b79220c2db481d18c253fda58301561 (patch) | |
| tree | c588c65a39bc07a646ffb5497537cff3bca71adb /stmhal/modmachine.c | |
| parent | 1f78e7a43130acfa4bedf16c1007a1b0f37c75c3 (diff) | |
stmhal/modmachine: Make machine.bootloader() work when MPU is enabled.
Diffstat (limited to 'stmhal/modmachine.c')
| -rw-r--r-- | stmhal/modmachine.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/stmhal/modmachine.c b/stmhal/modmachine.c index cb7957681..407b62f52 100644 --- a/stmhal/modmachine.c +++ b/stmhal/modmachine.c @@ -202,6 +202,11 @@ STATIC NORETURN mp_obj_t machine_bootloader(void) { HAL_RCC_DeInit(); HAL_DeInit(); + #if (__MPU_PRESENT == 1) + // MPU must be disabled for bootloader to function correctly + HAL_MPU_Disable(); + #endif + #if defined(MCU_SERIES_F7) // arm-none-eabi-gcc 4.9.0 does not correctly inline this // MSP function, so we write it out explicitly here. |
