FreeRTOS couldn't switch task

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

FreeRTOS couldn't switch task

跳至解决方案
1,548 次查看
asd046012
Contributor III

 Hello

     I use the SDK 2.9 version, and MCU is S32K114.

      After I config clock, pin, and FreeRTOS, compile,and run.

      I find that system tick run into interrupt and counter, but OS could not switch to others task,just always run in idle task.

     For the project code, please see the attachment.  

 

0 项奖励
1 解答
1,498 次查看
asd046012
Contributor III

Hello  

   This issue has been solved, the reason of causing this issue is SDK version bug.

    First I configured the max number of priority as 32,FreeRTOS shall not switch task, but when I configured the max number of priority as 8, all task run normally.

在原帖中查看解决方案

0 项奖励
4 回复数
1,534 次查看
asd046012
Contributor III

I find that code could enter into system tick interrupt, but couldn't enter into xPortPendSVHandler.  I still didn't find the reason.

0 项奖励
1,521 次查看
jiri_kral
NXP Employee
NXP Employee

I looked briefly at your project - and for some reason any task (except the idle one) is not created properly. I didn't dig deeper, but you are creating tasks as a static ones - means you maintaining memory for task info is up to you - So main issue is, that other task than Idle is not known for scheduler. 

0 项奖励
1,513 次查看
asd046012
Contributor III

Hello

    The method of creating task as a static one has been used in others MCU(S32K118), and use same SDK version.

     why could not create  task in idle task? 

    Now the all task just have simple operation, so I think the stack is enough.

    Is there a problem with the configuration of  FreeRTOS?

    Can you help to find out what is the reason?

 

 

0 项奖励
1,499 次查看
asd046012
Contributor III

Hello  

   This issue has been solved, the reason of causing this issue is SDK version bug.

    First I configured the max number of priority as 32,FreeRTOS shall not switch task, but when I configured the max number of priority as 8, all task run normally.

0 项奖励