Skip to content

Commit 49316b8

Browse files
committed
stmhal/modmachine: Make machine.bootloader() work when MPU is enabled.
1 parent 1f78e7a commit 49316b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stmhal/modmachine.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ STATIC NORETURN mp_obj_t machine_bootloader(void) {
202202
HAL_RCC_DeInit();
203203
HAL_DeInit();
204204

205+
#if (__MPU_PRESENT == 1)
206+
// MPU must be disabled for bootloader to function correctly
207+
HAL_MPU_Disable();
208+
#endif
209+
205210
#if defined(MCU_SERIES_F7)
206211
// arm-none-eabi-gcc 4.9.0 does not correctly inline this
207212
// MSP function, so we write it out explicitly here.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy