How to jump to bootloader from application on STM32F103
Hi there,
I'm trying to jump from my application to the bootloader on a STM32F103.
The bootloader address is 0x1FFFF000
This is my code, but unfortunately, it doesn't work:
void (*f_boot_jump)();
f_boot_jump = (void (*)(void)) (*((uint32_t *)(0x1FFFF000 + 4)));
HAL_RCC_DeInit();
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
__disable_irq();
__DSB();
SCB->VTOR = (uint32_t) 0x1FFFF000;
__DSB();
__ISB();
__set_MSP(*(__IO uint32_t*) 0x1FFFF000);
f_boot_jump();
I tried some variations of this code, but they didn't work either.
There is one code that I found using the function:
__HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH();
But the compiler says "undefined reference" to this function.
Any ideas? Thanks for your help!
