Skip to main content
Suriya One.Zero
Associate II
September 21, 2019
Solved

IAP bootloader not jumping to the application address.

  • September 21, 2019
  • 2 replies
  • 5452 views

0690X00000ARTRCQA5.pngI am working on IAP in STM32F4. I received .bin file using uart and flash it in 0x08004000 address successfully and disable irq , set msp , set vector, deinit hal , reset the systick registers but the jump is not working , It just freeze there. Can anyone help me on this.

This topic has been closed for replies.
Best answer by oleksandr.karbivsky

Do your application use SystemInit function (system_stm32SSxx.c location)? If yes, check what value it write to SCB->VTOR.

2 replies

Tesla DeLorean
Guru
September 21, 2019

Check the assembler code generated by the compiler.

Check the values​ it is pulling from the vector table.

Use the debugger properly to step the code and follow where it is going.

Make sure the app code enables the IRQS again.

Have a functional Hard Fault Handler in both loader and application.​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Suriya One.Zero
Associate II
September 23, 2019

I now have a new problem. As an example IAP code using YMODEM is worked on my board. So, I thought of modify it to find the difference of my code and the example one. And I did but with little confusion. The code only works in optimization when I set level 0 it wont work. And I also need to add two variables next to jump statement. If I even comment one variable initialization It wont work properly. I don't know what to do? 0690X00000ARVBVQA5.png

Suriya One.Zero
Associate II
September 23, 2019

sorry it works without optimization and i figured out the problem. The problem is with the application code. I use Blink program and on Delay function call it get struck. I removed it and put a for loop for delay. Now it works. But why delay didn't work?

oleksandr.karbivsky
Senior II
September 23, 2019

Do your application use SystemInit function (system_stm32SSxx.c location)? If yes, check what value it write to SCB->VTOR.

Suriya One.Zero
Associate II
September 23, 2019

I changed the scb->vtor value to app offset in system file but nothing happend.