AnsweredAssumed Answered

[STM32L476RG] Jump to Bootloader from Software.

Question asked by Loïc Bouilly on Apr 19, 2017
Latest reply on Oct 20, 2017 by Steve Krattiger



I want to use DFU for update my program on the STM32L476RG. I use a personnal board. When I put BOOT0 to VCC, the Bootloader start and we can change the firmware but my system is on battery and I have no access to BOOT0 pin and RESET. 


So I want to jump in bootloader directly from software for that I have search the start addresse of system memory of the MCU -> 0x1FFF0000. So this is my code  :

#define USBD_DFU_APP_DEFAULT_ADD              0x1FFF0000

pFunction JumpToApplication;
uint32_t JumpAddress;

**** some code HERE


SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;

/* Jump to user application */
JumpAddress = *(__IO uint32_t*) (USBD_DFU_APP_DEFAULT_ADD + 4);
JumpToApplication = (pFunction) JumpAddress;
* Step: Disable all interrupts

/* Initialize user application's Stack Pointer */
__set_MSP(*(__IO uint32_t*) USBD_DFU_APP_DEFAULT_ADD);


When I use this code the system reset but not in DFU mode. What I have miss for do a good reset DFU ? 

I have try the USBD_DFU_APP_DEFAULT_ADD to 0x00000000 no change.