stmhal/modmachine: Make machine.bootloader() work when MPU is enabled.
This commit is contained in:
parent
1f78e7a431
commit
49316b864b
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue