Initially my code stuck at that point configASSERT( ucCurrentPriority >= ucMaxSysCallPriority );?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Initially my code stuck at that point configASSERT( ucCurrentPriority >= ucMaxSysCallPriority );?

跳至解决方案
8,511 次查看
shivamshankarg
Contributor III

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.

1 解答
8,417 次查看
ErichStyger
Specialist I

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

在原帖中查看解决方案

1 回复
8,418 次查看
ErichStyger
Specialist I

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