I was just using an ISR for a FreeRTOS task, initially it was not working fine because I have not set the priority for the ISR, it was my be in default priority, so while debugging what i found it is always stuck at this line
configASSERT( ucCurrentPriority >= ucMaxSysCallPriority );
so I just saw in my RTOS, my MaxSysCallPriority is already set to 1, which can be (1 to 15).
so I manually set the ISR priority to 3
INT_SYS_SetPriority(BTN_PORT_IRQn, 3);
then it was working fine but I am very confused about this as S32 Design studio It shows MaxSysCallPriority is a maximum priority which can provide to our ISR.
QUES1. so why we need to put grater than MaxSysCallPriority to work it perfectly.
QUES2. And what is the by default priority of an ISR lets say I am using S32K144 EVB and taking interrupt from button which is connected in port c.
Solved! Go to Solution.
I recommend you have a read at the following article series which
ARM Cortex-M, Interrupts and FreeRTOS: Part 1 | MCU on Eclipse
ARM Cortex-M, Interrupts and FreeRTOS: Part 2 | MCU on Eclipse
ARM Cortex-M Interrupts and FreeRTOS: Part 3 | MCU on Eclipse
Especially Part 3 explains how the RTOS creates critcal sections and the separation of interrupts and RTOS API calls:
https://mcuoneclipse.files.wordpress.com/2016/08/freertos-and-interrupts.png?w=584&h=312
I hope this helps,
Erich
I recommend you have a read at the following article series which
ARM Cortex-M, Interrupts and FreeRTOS: Part 1 | MCU on Eclipse
ARM Cortex-M, Interrupts and FreeRTOS: Part 2 | MCU on Eclipse
ARM Cortex-M Interrupts and FreeRTOS: Part 3 | MCU on Eclipse
Especially Part 3 explains how the RTOS creates critcal sections and the separation of interrupts and RTOS API calls:
https://mcuoneclipse.files.wordpress.com/2016/08/freertos-and-interrupts.png?w=584&h=312
I hope this helps,
Erich