AnsweredAssumed Answered

stm32f103ret6 bootloader cannot go to application correctly

Question asked by Jian Chen on Nov 28, 2017
Latest reply on Nov 29, 2017 by Jian Chen

Hi,

 

In my stm32f103ret6 bootloader firmware, I am able to load the application code to memory area 0x08009000 to 0x08011BE0.

 

The linker file of bootloader specifies:

define symbol __ICFEDIT_intvec_start__ = 0x08000000; define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; define symbol __ICFEDIT_region_ROM_end__   = 0x08008FFF;

 

The linker file of application specifies:

define symbol __ICFEDIT_intvec_start__ = 0x08009000; define symbol __ICFEDIT_region_ROM_start__ = 0x08009000; define symbol __ICFEDIT_region_ROM_end__   = 0x0807FFFF;

 

But after I jump to application from the bootloader, the application firmware does not run.  What is wrong? The jump is as follows: =========================================================

#define FLASH_USER_START_ADDR ((uint32_t)0x08009000)

      HAL_RCC_DeInit();        

      SysTick->CTRL = 0;        

      SysTick->LOAD = 0;        

      SysTick->VAL = 0;        

      __disable_interrupt();                

      JumpAddress = *(__IO uint32_t*) (FLASH_USER_START_ADDR + 4);        

      JumpToApplication = (pFunction) JumpAddress;        

      __set_MSP(*(__IO uint32_t*) FLASH_USER_START_ADDR);        

      JumpToApplication();

Outcomes