Nested the same Interrupt on STM32F446RC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-06 2:50 AM
Hello community,
It is possible that an interrupt will be nested over itsef?
I mean, I have one interrupt EXTI0_IRQHandler() and inside the interrupt I am waiting an event that requires the execution of the same interrupt.
I read the PM0214 and it is said that "Preemption When the processor is executing an exception handler, an exception can preempt the exception handler if its priority is higher than the priority of the exception being handled"
In my case, Could I change the prioriry of the IRQ dinamically so the new event will be processed as a new IRQ nested with the same IRQ??
Thank you very much for your help
Solved! Go to Solution.
- Labels:
-
GPIO-EXTI
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-06 6:52 AM
An interrupt cannot preempt itself. It will get fired again after it completes if the relevant flags are still set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-06 6:05 AM
- In IRQ clear the interrupt to allow second interrupt, then clear the second interrupt before exiting
- Find a different way
- like in interrupt increment a counter, and outside interrupt idle in a loop till counter is high enough then zero it and continue
- or better instead of zeroing counter do a decrement like Counter-=2 and repeat till under 2 then won't miss any events.
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-06 6:52 AM
An interrupt cannot preempt itself. It will get fired again after it completes if the relevant flags are still set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-06 7:58 AM
What do you need to achieve in the hw ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-07 12:53 AM
I think as TDK said that it is not possible to have the same interrupt nested inside itself.
I did a workaround to solve the situation.
Thank you all for your answers.
