2014-10-20 04:06 AM
Hi,
I have an application where interrupts come very fast on a timer (about 100kHz). Most time this interrupt is handled very immediate, and then all is fine. This interrupt should have quite high pre-emptive priority, so that it can interrupt also other ''not so important interrupts''. Just sometimes I want to do some heavier processing also in this fast interrupt. In this case it would be necessary, that I somehow ''decrease the interrupt priority level'' for the running interrupt, and I have to do this WITHIN the interrupt routine (so while the intterupt is running - so that if another higher prio interrupt arrives, it will interrupt this ''heavier processing''). Is this possible by some register access? Or is it necessary to invoke another software interrupt with lower priority to do the lower priority processing then in this software interrupt? (register access of course would be very nice, as then I would not loose any processing time for push/pop of registers, also it would be more economic for the stack).2014-10-20 04:37 AM
Hi
'' it would be necessary, that I somehow ''decrease the interrupt priority level'' for the running interrupt, and I have to do this WITHIN the interrupt routine'' I believe that this is impossible! Once an IRQ triggers and it is executing it's ISR the ARM core hardware has already determined the IRQ and the IRQ level. ''Just sometimes I want to do some heavier processing also in this fast interrupt.'' This appears to be your root cause of your problem. Find another way to do the 'processing' outside of the ISR and then get the ISR to pick up the result.2014-10-20 05:26 AM
Read ''Execution priority and priority boosting'' on p.B1-637, in ARMv7-M Architecture
Reference Manual, ARM DDI 0403D JW2014-10-20 11:42 AM
Thanks - looking for ''Priority'' in the ARM7 Manual (given in your post): There it describes a special instruction ISB, one of its purposes is ''re-prioritizing the exceptions that have configurable priority'' ... just not stating whether this is inside an interrupt routine.
Further there is a very promising example ''B1-1'' on page B1-638. I seems to be possible to decrease the Priority (thus increase the priority number) of a running interrupt ... . Just unfortunately this is not the solution for my problem, this would generally decrease the priority of my 100kHz interrupt. I am looking for a way to keep the 100kHz interrupt in ''hot priority'' state, but just somehow decrease the priority of the current ''additional processing stuff'' ... so I think I will have to invoke a sort of software interrupt for this.