cancel
Showing results for 
Search instead for 
Did you mean: 

Reg:Bootloader

vamshi_kumar
Associate II

Hello Team,

 

I am trying to implement a bootloader for stm32f769 controller, My bootloader code resides in sector 0 and application code in sector 5. But I am not able to jump from bootloader code to application code. Any help will be highly useful.

 

Bootloader code - 0x08000000

Application code - 0x08040000

 

Below is my Bootloader code :

 

void goto_application(void)
{
 
 
printf("Gonna Jump to Application\n");
 
  void (*app_reset_handler)(void) = (void*)(*((volatile uint32_t*) (0x08040000+4)));
  SCB->VTOR = 0x08040000;
  __set_MSP(*(volatile uint32_t*) 0x08040000);
  /* Jump to application */
  app_reset_handler();    //call the app reset handler
 
}

 

Thanks,

vamshi kumar

 

1 REPLY 1
Sarra.S
ST Employee

Hello @vamshi_kumar

Make sure that all peripherals used by your application are reset to the default state before jumping to the bootloader.

Also, I invite you to follow this FAQ: How to jump to system bootloader from application ... - STMicroelectronics Community

Hope that helps!

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.