IAP: jump to new program from within ISR
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-05-13 9:20 PM
Posted on May 14, 2015 at 06:20
Hello,
Just finished writing a custom boot loader (in application programming) that works over UART. I received new program data through a terminal program, and then after writing the appropriate data of the new program to flash, I jumped to the new code. The thing is, I realized that I was doing this within the UART interrupt routine that received the final program data byte. The new program executed, but things that normally work via interrupts such as GPIO toggling I had setup for timing were not working. Timers setup to work as PWM sources were working, however. Conclusion: the jump to the new program worked (kind of), but there was a problem with interrupts. Exiting the UART interrupt after setting a ''download complete'' flag in the boot loader code and THEN jumping to the new program from main() fixed the problem.So, I solved the problem, but I am looking for wisdom that can explain what was happening here. Any input would be much appreciated. #iap #boot-loader #stm32f2
Labels:
- Labels:
-
Bootloader
-
STM32F2 Series
0 REPLIES 0
