cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt about interrupt priority

federico.massimi
Associate III

Hi, I have a doubt about interrupt priority.

Let's say we have two ISRs for two interrupts: interrupt A and interrupt B, where A has a higher priority than B.

If the ISR of B is running and an interrupt A arrives, then the ISR B is interrupted, that of A is executed, and then the ISR of B is resumed.

But if the ISR of A, the interrupt with the highest priority, is running and an interrupt B arrives, what happens? Is interrupt B ignored and continuing to execute ISR of A, or the B ISR is queued and executed after A ISR and then continuing with the normal program?

1 REPLY 1

Interrupts at the same preemption level get serviced in priority order (numerically lowest first) as the current one tail-chains out of its handler. ie it only pushes context once, services, or reservices, all until all sources are cleared.

For one interrupt to interrupt another, it needs to have a numerically lower preemption level and the NVIC grouping (bit mix) needs to be configured appropriately.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..