I am trying to handle an interrupt with very low latency on a CORTEX-M0 (NXP LPC11C24). To do this I don’t let FreeRTOS get in the way, nor do I call any FreeRTOS routines from the interrupt. Most of the time it is working well, but every now and again (3-4 times per second in my specific use case) I see delays of anything up to 20uS in interrupt response.
The interrupt is fired from a timer match, and I have tried various priorities (at the moment it’s set as NVIC_SetPriority(TIMER_32_0_IRQn,0) which, I hope, will give me the highest priority/pre-emption available).
The problem is much worse when I have configTICK_RATE_HZ set to a high value (e.g. 1000), and much better when I have it set lower (100)…but it’s still present in all conditions.
I’m pretty sure the problem occurs because FreeRTOS is doing its housekeeping in response to its tick, but I would expect my high priority interrupt to take precidence…it isn’t :-/ This is obviously sticky fingers and I am not understanding something about CORTEX-M0 interrupt configuration - does the M0 loose the prioritisation and pre-emption features of the larger CORTII, or am I neglecting to perform some incantation thats needed to make it fly?
Thanks in advance for help or advice