cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS, preemption priorities and IRQ response time

MK..1
Associate III

Hi

in my project I have enabled FreeRTOS, so the NVIC prios 0-4 are reserved for FreeRTOS.

I need to generate a highly accurate 1 sec timer interrupt.

Is it correct that FreeRTOS interrupts might delay my (cortex) timer intterupt handlers to be called?

Is there a way to figure out what the jitter of my timer will be?

Thx

 

3 REPLIES 3
TDK
Guru

You can still use interrupts with high priority, they just can't call FreeRTOS functions. If this is critical to your application, there should be a way to make that work. If the 1sec timer is the most important things, set it to priority 0 and have everything else be 1+.

If you feel a post has answered your question, please click "Accept as Solution".
MK..1
Associate III

Well, Freertos/cube Reserves priorities 0-4. So the Timer Interrupt will have prio 5.  Right?

FreeRTOS does not reserve any priorities.  The LIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY setting in CubeMX specifies the lowest interrupt priority value (i.e. highest priority) that is able to call FreeRTOS functions, as @TDK mentioned above.  If you use the default value of 5, that means priorities 0-4 are still available for you to use, but any interrupt code running at those priorities cannot call FreeRTOS functions (i.e. no mutex, semaphore, queue, etc. calls).