mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 11:10:14 +01:00
stmhal: Remap system flash and adjust addresses
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
This commit is contained in:
@@ -70,8 +70,9 @@ STATIC NORETURN mp_obj_t pyb_bootloader(uint n_args, const mp_obj_t *args) {
|
||||
HAL_RCC_DeInit();
|
||||
HAL_DeInit();
|
||||
|
||||
__set_MSP(*((uint32_t*) 0x1fff0000));
|
||||
((void (*)(void)) *((uint32_t*) 0x1fff0004))();
|
||||
__HAL_REMAPMEMORY_SYSTEMFLASH();
|
||||
__set_MSP(*((uint32_t*) 0x00000000));
|
||||
((void (*)(void)) *((uint32_t*) 0x00000004))();
|
||||
|
||||
while (1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user