Process gets stuck in the initialization phase before enter main(), because of timer interrupt?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-03-20 11:59 PM
I am developing on STM32-f030CCT6 MCU, and IDE is IAR.
​
There are two program in the flash, one is loader, one is application.
Loader is responsible to upload application, and jump to application location to execution.
​
Loader uses timer 6 as time base source.
After jumping from loader to application, application gets stuck in the initialization phase before enter main().
However, if I turn off timer 6 before jumping to application, it works fine.
If loader uses system tick as time base source, it works fine as well.
​
My questions is, Do timer interrupts cause application to get stuck?
If it is the reason, why system tick works fine? System tick causes interrupts as well.
​
Thanks for your time to read this question!
Hope could get help for this, thanks a lot.
- Labels:
-
STM32F0 Series
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-03-21 1:59 AM
You probably have two different vector tables, one for the loader, other for the application.
Is a proper interrupt handler defined for TIM6 in both?
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-03-21 2:03 AM
Yes, bootloader and application supposedly work on a different set of interrupt vectors.
It would be wise to disable all interrupts before jumping to the application, and do a full initialization there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-03-21 10:40 PM
Yes, I do have two vector tables. Those two both define interrupt handler for TIM6.
In the beginning of application's main function, application's vector table is copied to SRAM and used.
Before copying application's vector table to SRAM, the vector table of loader is used. Even its in system initialization of application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-03-21 10:43 PM
I see, thanks.
However, I still wandering how TIM6 interrupt affect system initialization of application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-03-21 11:07 PM
I don't know your BL and application.
But if you don't disable the timer interrupt, it may hit after you had jumped to to the app, while initializing.
