Skip to main content
DBurr
Senior
March 19, 2021
Solved

Is it possible to interrupt another interrupt?

  • March 19, 2021
  • 8 replies
  • 1666 views

This is a fairly high-level question... but just wondering whether the NVIC system is capable of interrupting an interrupt when one of higher priority comes in? Can someone point me to information on this?

Thanks,

Doug Burrell

This topic has been closed for replies.
Best answer by waclawek.jan

Have you read PM0253, focusing on Priority Grouping?

JW

8 replies

waclawek.jan
Super User
March 19, 2021

Yes.

Read PM0253, mainly Exception model chapter, and focus on Priority Grouping.

JW

DBurr
DBurrAuthor
Senior
March 19, 2021

Thanks for your reply.

I believe my system should be configured correctly then, I just wasn't sure if I had things set up correctly.

Basically, to explain my system, I have an EXTI interrupt that I have set the priority to 5 and my ethernet interrupt priority to 6 (lower than the EXTI interrupt). The EXTI interrupt is connected to an external IC that handles communication over another bus to keep it simple. But what I am seeing is when I have constant ethernet activity the EXTI bus misses the odd packet. But with the ethernet activity stopped, then the EXTI bus does not miss any packets. I feel like this shouldn't be the case since the EXTI interrupt is a higher priority so it should take precedence over the ethernet interrupt. Do you have any suggestions for how I have my system configured so that the EXTI interrupt will always override the ethernet interrupt, and so that even if the ethernet interrupt is already in progress the EXTI will take precedence?

Thanks,

Doug Burrell

Tesla DeLorean
Guru
March 19, 2021

Have the grouping set up for 2-bit preempt 2-bit priority, make sure that the Ethernet has a higher preempt setting than the EXTI

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
waclawek.jan
waclawek.janBest answer
Super User
March 19, 2021

Have you read PM0253, focusing on Priority Grouping?

JW

DBurr
DBurrAuthor
Senior
March 19, 2021

Yes, it says that only the group priority determines the preemption of interrupt exceptions. So I have EXTI interrupt preempt priority set to 5, subpriority to 0, and for Ethernet I have preempt priority set to 6 and subpriority to 0. I've also got the grouping set to 4 bits for pre-emption priority. Does this all sound correct so that EXTI interrupts can preempt the Ethernet interrupts?

waclawek.jan
Super User
March 19, 2021

Yes it sounds good, EXTI should be able to interrupt ETH. Do you experience something different? You may want to read out the related registers content and check/post.

JW

DBurr
DBurrAuthor
Senior
March 19, 2021

Thanks, I think things are working correctly but I'm just not sure how when I get a lot of ethernet activity, my EXTI interrupt source starts to lose packets. I have to take a really close look at these register contents. Thanks!