hank
hank

Reputation: 1

will one miss when three interrupts of the same priority are triggered (Cortex-M)?

Assuming that an interrupt XN takes 5 seconds (exaggeratedly), then I trigger the first X1 interrupt in the 1st second, the second X2 interrupt in the second, and the third X3 interrupt in the third, in fact What will happen? Will the interrupt be lost?

Upvotes: 0

Views: 118

Answers (1)

Tom V
Tom V

Reputation: 5470

If these are three different interrupt numbers then they can all stay pending for as long as it takes for the first one to be serviced, and will run after it. If they are higher priority then they could even pre-empt the first one and be serviced part way through the 5 seconds.

If the same edge-sensitive interrupt occurs three times before the first is handled, then yes you are correct that the interrupt handler will only run twice and the third occurrence is lost.

If the same level-sensitive interrupt occurs three times before the first is handled, then it depends when during the handler function you clear the respective flag. It is quite possible that the handler only runs once and both the second and third occurrences are lost.

Upvotes: 1

Related Questions