Teensy 3 Nested Interrupts

Status
Not open for further replies.

Khan

Member
I've been trying to figure out what exactly happens on Teensy 3 when multiple interrupts are triggered. Generally speaking, if an interrupt with a higher group priority is triggered while servicing an interrupt, it will preempt. If multiple interrupts are pending with the same group priority, then the subpriority is used to determine the next serviced interrupt. The lower the priority, the higher the interrupt. The division of group/subpriority for interrupt priority is defined in the AIRCR register.

My questions:

1) Is my understanding correct?
2) I couldn't find anywhere where the interrupt priority or the AIRCR register was being changed, so I'm assuming the default priority is set for all interrupts and default group/subpriority. What is the default priority/grouping?
3) To utilize interrupt priorities, would I only need to update the AIRCR register (if needed) and set the desired priorities for the interrupts I want to use?

This is mostly out of interest, I plan on using two timer interrupts and wondered what would happen if they both triggered. I don't think either service routine will be long enough to impact the other in my intended application, so that's why it doesn't really matter if these interrupts use priorities, but still nice to learn :).

Thanks!
 
Status
Not open for further replies.
Back
Top