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.
2019-09-23 02:01 AM
Do your application use SystemInit function (system_stm32SSxx.c location)? If yes, check what value it write to SCB->VTOR.
2019-09-21 03: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.
2019-09-23 02:01 AM
Do your application use SystemInit function (system_stm32SSxx.c location)? If yes, check what value it write to SCB->VTOR.
2019-09-23 03:27 AM
I changed the scb->vtor value to app offset in system file but nothing happend.
2019-09-23 03: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?
2019-09-23 03: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?
2019-09-23 03: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?
2019-09-23 03: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?
2019-09-23 03:52 AM
Do you enable interrupt on your application with __enable_irq()?
2019-09-23 05: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.