How to configure interrupt priorities when using freertos for s32k142

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

How to configure interrupt priorities when using freertos for s32k142

跳至解决方案
834 次查看
elb1
Contributor III

Hello all, I am using freertos for s32k142 microcontroller, all the tasks are working fine, and i want now to implement gpio interrupt, but I am really confused on how to configure priorities.
What numbers i can give to these macros (configKERNEL_INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY) from freeRtosConfig.h ?
I have read what is in this link "https://forums.freertos.org/t/freertos-interrupt-priorities-vs-mcu-interrupt-priorities/16345" but they say that it is microcontroller specific, can anyone help me where i can find that information for s32k142, or some example ?

0 项奖励
回复
1 解答
790 次查看
elb1
Contributor III

Hello, I have found already an example for freertos for my microcontroller, so no need to answer this.
Thank you.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
781 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @elb1 

maybe for others:

S32K1 devices have 4 priority bits -> 16 priority levels.

As mentioned in these articles:

https://www.freertos.org/a00110.html#kernel_priority
https://www.freertos.org/RTOS-Cortex-M3-M4.html

... configKERNEL_INTERRUPT_PRIORITY should be set to the lowest interrupt priority, i.e. to 0xF.


About configMAX_SYSCALL_INTERRUPT_PRIORITY:

"The RTOS interrupt nesting scheme splits the available interrupt priorities into two groups - those that will get masked by RTOS critical sections, and those that are never masked by RTOS critical sections and are therefore always enabled. The configMAX_SYSCALL_INTERRUPT_PRIORITY setting in FreeRTOSConfig.h defines the boundary between the two groups. The optimal value for this setting will depend on the number of priority bits implemented in the microcontroller."

configMAX_SYSCALL_INTERRUPT_PRIORITY is set to 1 by default in our sample projects.

Regards,
Lukas

0 项奖励
回复
791 次查看
elb1
Contributor III

Hello, I have found already an example for freertos for my microcontroller, so no need to answer this.
Thank you.

0 项奖励
回复