Question
I am trying to jump from my application into the bootloader. It works as long as I pull the pin BOOT0 high, which in my case means setting a jumper. Is there a way to get into the bootloader while BOOT0 is pulled low? My device is STM32L412.
Device: STM32L412
Code:
typedef void (*pFunction)(void);
volatile uint32_t addr = 0x1FFF0000;
uint32_t JumpAddress = *(__IO uint32_t*) (addr + 4);
pFunction Jump_To_Boot = (pFunction) JumpAddress;
#if defined(USE_HAL_DRIVER)
HAL_RCC_DeInit();
#endif /* defined(USE_HAL_DRIVER) */
#if defined(USE_STDPERIPH_DRIVER)
RCC_DeInit();
#endif /* defined(USE_STDPERIPH_DRIVER) */
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
__disable_irq();
__HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH();
__set_MSP(*(__IO uint32_t*) addr);
Jump_To_Boot();
SOURCE: https://stm32f4-discovery.net/2017/04/tutorial-jump-system-memory-software-stm32/
I also tried configuring BOOT0 pin as ouput and setting it high before Jump_To_Boot() but without success.
