2011-05-05 07:11 AM
Equal Priority Level Interrupts.
2011-05-17 05:33 AM
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.