FreeRTOS task

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

FreeRTOS task

Jump to solution
1,140 Views
davidzhu
Contributor III

I  have two tasks with the same priority. task1 and task2.    When I debug the project, I find CPU stuck in task 1, never switch to task 2.

I don't know why. can you guide me how to solve this issue?

0 Kudos
1 Solution
1,062 Views
FreeRTOS_org
Contributor IV

How are you determining the CPU is stuck in task 1?  If you put a break point in task 2, is it ever hit - if so - how many times, just once or many times.  What does task 2 do - does it block or suspend itself for any reason - please show the code.  Is the tick interrupt executing (if you put a break point in vTaskSwitchContext() FreeRTOS-Kernel/tasks.c at master · FreeRTOS/FreeRTOS-Kernel · GitHub  is it hit?  Is the xTickCount variable in the same file incrementing?).

View solution in original post

0 Kudos
2 Replies
1,063 Views
FreeRTOS_org
Contributor IV

How are you determining the CPU is stuck in task 1?  If you put a break point in task 2, is it ever hit - if so - how many times, just once or many times.  What does task 2 do - does it block or suspend itself for any reason - please show the code.  Is the tick interrupt executing (if you put a break point in vTaskSwitchContext() FreeRTOS-Kernel/tasks.c at master · FreeRTOS/FreeRTOS-Kernel · GitHub  is it hit?  Is the xTickCount variable in the same file incrementing?).

0 Kudos
1,062 Views
davidzhu
Contributor III

Thank you Richard for your  good suggestions.  The tick interrupt is executing.  After tried your tips, I found the issue is in my application.  Thank you.

0 Kudos