IAP bootloader not jumping to the application address.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-20 11:42 PM
I 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.
Solved! Go to Solution.
- Labels:
-
Bootloader
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-23 2:01 AM
Do your application use SystemInit function (system_stm32SSxx.c location)? If yes, check what value it write to SCB->VTOR.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-21 3:11 AM
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.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-23 2:01 AM
Do your application use SystemInit function (system_stm32SSxx.c location)? If yes, check what value it write to SCB->VTOR.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-23 3:27 AM
I changed the scb->vtor value to app offset in system file but nothing happend.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-23 3:34 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-23 3:34 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-23 3:48 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-23 3:48 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-23 3:52 AM
Do you enable interrupt on your application with __enable_irq()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-23 5:40 AM
Thank you so much. Your first suggestion works after the recent modification. But still didn't figured out how optimization affects it so much. I did IAP in HAL and APPLICATION also in HAL. Now its working fine now.Problems may arise when going to build real application. Anyways thank you so much.
