cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to interrupt another interrupt?

DBurr
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions

Have you read PM0253, focusing on Priority Grouping?

JW

View solution in original post

8 REPLIES 8

Yes.

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

JW

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

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
Up vote any posts that you find helpful, it shows what's working..

Have you read PM0253, focusing on Priority Grouping?

JW

I currently have the grouping set up for 4 bits for pre-emption priority but the Ethernet has a higher preempt value than EXTI. Does the grouping config matter here?

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?

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

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!