Prevent returning to nested interrupt

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Let there be interrupts configured with multiple priorities. If high-priority interrupt is to be executed while the low-priority interrupt is executing, CM0 nests the interrupts, pre-empts the low-priority interrupt and executes the high-priority one.

Now, the question - we would like to decide in high-priority interrupt whether we want to return the execution to the low-priority interrupt or skip/disable it. Is this possible?

Would changing the LR from 0xFFFFFFF1 to 0xFFFFFFF9 and taking data off the stack do it?

0 Likes
1 Solution

The system should not unexpectedly stall. Try setting the BLE interrupt priorities to highest priority (lower number).

Bob

View solution in original post

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I do not think so. Tail-chaining and late arriving mechanisms would make the handling unpredictable.

Better solution would be to set a flag in the high priority handler and check for that in the appropriate places.

Bob

0 Likes
Anonymous
Not applicable

The problem is in the fact that in my case, the execution stalls in one of the interrupts (BLE stack, not accessible to us). I was thinking of possibility to restart only a subsystem (BLE) instead of doing a full system reset, but we would need to cancel the execution of the stalled interrupt...

0 Likes

The system should not unexpectedly stall. Try setting the BLE interrupt priorities to highest priority (lower number).

Bob

0 Likes