cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with STM32F205 BOOTLOADER

MHéna.1161
Associate

Hello,

i have one problem with bootloader application. I used STM32F205 microcontroller

My Bootloader SW starts to 0x0800000 address and my application starts to 0x08010000 address.

Application is correctly written but it's not possible to jump on the 0x0801000

I used a STM32 example :

if ((((*(__IO uint32_t*)APPLICATION_ADDRESS) & 0xFF000000 ) == 0x20000000) || \

     (((*(__IO uint32_t*)APPLICATION_ADDRESS) & 0xFF000000 ) == 0x10000000))

   {

     /* Jump to user application */

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

     Jump_To_Application = (pFunction) JumpAddress;

     /* Initialize user application's Stack Pointer */

     __set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS);

     Jump_To_Application();

   }

In debug mode, "Jump_To_Application" function is passed but any jumping is done.

I tried to set the Vector Table Offset Register, but without progress :

SCB->VTOR = APPLICATION_ADDRESS

Did i forget something ?

2 REPLIES 2

>>Did i forget something ?

Hard to say.

Don't do this from an IRQ Handler or callback routine.

Print out the values you read back from the two base words on the new vector table.

SCB->VTOR is typically set in SystemInit() of the app, check it is building with the right value.

Use a debugger and step into the jump, take the assembler view rather than the C one, confirm it goes to your app's Reset Handler routine.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MHéna.1161
Associate

Thank you for your quick response,

I found my problem => it's was placed in my application software. I forgot to set VECT_TAB_OFFSET (is was set to 0x00)