cancel
Showing results for 
Search instead for 
Did you mean: 

Equal Priority Level Interrupts.

babulad
Associate
Posted on May 05, 2011 at 16:11

Equal Priority Level Interrupts.

1 REPLY 1
Posted on May 17, 2011 at 14:33

Well I'm pretty sure they won't ''nest'', they will be ''queued''. Do you really need nesting/reentrant behaviour?

You'll need to clear the pending status and exit one service routine for the next to start. Tail-chaining just means it doesn't have to unstack/restack registers pointlessly. Failure to clear the pending status/cause will make the routines tail-chain endlessly and no foreground or lower priority code will execute.

While I'm not going to quote the TRM chapter and verse, the crux of priority/preemption order is going to be determined by the levels you program into the NVIC, the order in which the interrupts arrive to some extent, and if you set them all at the same levels the NVIC will order based on the implicit numbering of the interrupt sources.

At the same level the interrupt routine is going to service the perceived highest value pending interrupt, once you exit your service it will then re-evaluate the *current* perceived highest value pending interrupt and service that next. It will also then descend down any preemption levels. Rinse-and-repeat. Once it has handled everything pending, normal user mode execution will resume.

A different, higher, preemption level will break current interrupt servicing to service the new source. It will nest, it will stack the current state so it can come back to it later.

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