STM32F303x Discovery SysTick Interrupt Disabled During Execution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-22 3:56 AM
I am using SysTick_Handler() to execute a piece of code every few milliseconds. When I am in this function doing stuff, is the interrupt disabled? In other words, if I set the int to 10mS and I take 11mS to execute the code, what happens?
#stm32f3-discovery-systick- Labels:
-
SysTick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-22 7:49 AM
It would depend on your priority and preemption levels set in the NVIC. The interrupt itself will run to completion, and if another SysTick is pending it will likely immediately re-enter. Everything at the same preemption level will also wait until you exit, and the tail-chaining will determine the next handler to enter based on it's priority level.
One could measure the time in the interrupt by toggling a GPIO upon entry/exit, or getting a time stamp from a free running counter, or DWT_CYCCNT for example. If your processing takes longer than the allotted time, you're going to saturate the processor, and no foreground code is going to run.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
‎2014-12-22 8:19 AM
The SysTick is the only interrupt I use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-22 8:49 AM
Ok, then the salient point would be it's not going to reenter (recurse), but run to completion, and then probably fire again immediately.
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
‎2014-12-23 2:45 AM
Thanks - I was wondering why it didn't just crash as memory was used up.
