2024-10-08 10:34 AM
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
2024-10-08 11:10 AM
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+.
2024-10-08 12:58 PM
Well, Freertos/cube Reserves priorities 0-4. So the Timer Interrupt will have prio 5. Right?
2024-10-08 02:40 PM
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).