FreeRTOS couldn't switch task

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FreeRTOS couldn't switch task

Jump to solution
1,471 Views
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 Kudos
1 Solution
1,421 Views
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.

View solution in original post

0 Kudos
4 Replies
1,457 Views
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 Kudos
1,444 Views
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 Kudos
1,436 Views
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 Kudos
1,422 Views
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 Kudos