Commit 9bf4f7e3 authored by Sven Wegener's avatar Sven Wegener
Browse files

stmhal: Remap system flash and adjust addresses


Signed-off-by: default avatarSven Wegener <sven.wegener@stealer.net>
parent 7ae8e4b6
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment