cancel
Showing results for 
Search instead for 
Did you mean: 

Bootloader - what happens when it jumps to the application after its loaded

Ken Macfarlane
Associate II

I have bootloaded a CAN application, and after its loaded & the application starts, it can transmit but it doesn't receive.

What steps happen as the bootloader hands over control to the new application? For example, how does it know where to jump to?

I have trawled through lots of the knowledge base & there are articles about writing custom bootloaders & how to jump from the application to the system bootloader, but nothing that describes the most likely use case i.e. exiting the system bootloader & starting the user application. Presumably, the bootlloader interrupt vector table is replaced with the application's interrupt vector table & the PC & stack pointer are set to suit the application, but what else?

My point in asking this is to uncover if there's anything that I need to do in an application that is to be bootloaded, as opposed to one that is loaded by an STLINK using SWD.

I'm using an STM32F446RE, on a Nucleo & on a custom PCB.

Thanks,

Ken  

1 REPLY 1
TDK
Guru

At the start of your program, your program should be doing everything necessary for it to run correctly, including, primarily, setting the stack pointer and setting the vector table offset. Nothing else special required. Ensure you're setting SCB->VTOR correctly within your application code.

If you feel a post has answered your question, please click "Accept as Solution".