Hi,
When i use FreeRTOS tasks with priorities 2,3,4,5 what i need to #define for XXX_CONFIG_IRQ_PRIORITY of SPI,SAADC and GPIOTE at the file sdk_config.h
Thanks
Hi,
When i use FreeRTOS tasks with priorities 2,3,4,5 what i need to #define for XXX_CONFIG_IRQ_PRIORITY of SPI,SAADC and GPIOTE at the file sdk_config.h
Thanks
IRQ priorities set are higher in priority compared to priorities of FreeRTOS. The freertos in itself runs in thread priority, so the tasks priorities within freertos are priorities only for freertos scheduler. That is when its thread context is running. enabling any IRQ of any peripheral will give less time for freertos to run as freertos on our port is running at lowest priority.
so if some task T1 with Priority P1 use SAADC with P7 and task T2 with P7 use SPI with P6 what is the flow?
Thanks
In FreerTOS P7 > P1 (higher number higher priority)
In ARM cortex NVIC SAADC P7 < SPI P6 (lower number is higher priority)
So any SPI event is serviced first in the SPI driver interrupt handler and then comes SAADC driver handling and if there is nothing else in SPI or SAADC, then freertos TASKS T2 and then T1 gets executed