FreeRTOS task

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

FreeRTOS task

跳至解决方案
812 次查看
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 项奖励
1 解答
734 次查看
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 项奖励
2 回复数
735 次查看
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 项奖励
734 次查看
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 项奖励