2016-03-22 04:46 AM
Hi,
I have two interrupt with different pre-emption priority.When the higher priority interrupt handler is executed, I would like to ''kill'' the lower priority interrupt handler, if it was running.is it possible?Thanks,Marco #handler #interrupt2016-03-22 05:38 AM
is it possible?
Yes, but you'd have to dig into the stack/state, I'm not sure it is the practical solution. It would be far cleaner if you solved your logic problem in a way that doesn't require this. Can you signal your other context to stop and leave?2016-03-22 06:26 AM
Hi Clive,
Yes, I already tried to set a flag and when the lower priority interrupt get back, before modifying the output, checks the flag. The problem is when the higher priority interrupt come after the flag check instruction. Is there a library function to empty the stack of lower priority interrupt?Thanks,2016-03-22 08:32 AM
Is there a library function to empty the stack of lower priority interrupt?
I'm not sure it is something appropriate for a library, it requires *you* to understand the processor context, in your system, and unwind it, to do this you'd review and understand the ARM TRMs thoroughly.If you are doing too much in the lower priority interrupt, perhaps that needs to move to a worker task, and you need to add more test/abort points, if the arrival of an interrupt needs to stop processing.