2024-03-26 06:42 AM
Dear Community,
I'm working on a bootloader project using an STM32L071. I was able to start the main application using the code below:
void HalSys_BootMainApplication()
{
/* Set address to jump to*/
volatile uint32_t jumpAddress = *(uint32_t*)(0x08008000 + 4);
pFunction jump = (pFunction)jumpAddress;
/* Set stack pointer to new initial value, located at the start of the new application */
__set_MSP(*(uint32_t*)0x08008000);
/* Jump to application */
jump();
}
The main application start successfully (I get a lot of logs over UART) but apparently the interrupts are not working. After having searched for a solution in the forum, I came across the SCB->VTOR which apparently must be set correctly in the main application such that it can find the correct interrupt addresses. So in the main application's system_init, I'm setting it to 0x08008000, but then the application doesn't even start at all. Any idea?
Many thanks in advance and best,
Marco
2024-07-05 02:36 AM
Hello @Marco Burgener ,
There are a few things to consider that might be causing the issue you're experiencing:
I hope my answer has helped you. When your question is answered, please select this topic as solution that answered you, it will help others find that answer faster.
Thanks for your contribution.
Dor_RH