attachInterrupt priority clarification

ajc225

Active member
I'm curious about how the teensy handles interrupts with the same priority. More specifically, if I have multiple attachInterrupts which all have a default priority of 128 and they get called at the same time, how does the teensy handle this situation? Also if one of the attachInterrupts gets flagged in the middle of another does it finish the current interrupt and move onto the next or does it stop the current one and resolves the more recently flagged interrupt?
 
Interrupts can pre-empt other interrupts that have lower priority, otherwise they have to wait until the current interrupt has finished.
 
So if they are the same priority they will wait, for each other to finish. But what if they are the same priority and they occur at the same time?
 
So if they are the same priority they will wait, for each other to finish. But what if they are the same priority and they occur at the same time?
If multiple interrupts have the same priority the lower numbered one will execute first.
 
Back
Top