Hello,
I am testing freertos_i2c_frdmk66f demo project.
I found master task has a higher priority than slave task
/*******************************************************************************
* Definitions
******************************************************************************/
/* Task priorities. */
#define slave_task_PRIORITY (configMAX_PRIORITIES - 1)
#define master_task_PRIORITY (configMAX_PRIORITIES - 2)
But slave IRQ has a higher priority than master irq.
I don't understand this, could someone please can explain it?
Solved! Go to Solution.
Hi
Please be noted that ISR has higher priority over the tasks.
A task is a software feature that is unrelated to the hardware on which FreeRTOS is running. The priority of a task is assigned in software by the application writer, and scheduler decides which task will be in the running state.
An interrupt service is a hardware feature because hardware controls which interrupt routine will run. Tasks will only run when there are no ISRs running. So the lowest priority interrupt will interrupt the highest priority task.
For FreeRTOS task priority, the bigger the number, the lower is the priority.
Regards
Daniel
Hi
Please be noted that ISR has higher priority over the tasks.
A task is a software feature that is unrelated to the hardware on which FreeRTOS is running. The priority of a task is assigned in software by the application writer, and scheduler decides which task will be in the running state.
An interrupt service is a hardware feature because hardware controls which interrupt routine will run. Tasks will only run when there are no ISRs running. So the lowest priority interrupt will interrupt the highest priority task.
For FreeRTOS task priority, the bigger the number, the lower is the priority.
Regards
Daniel