Freertos on 5748G stuck in portTASK_FUNCTION

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

Freertos on 5748G stuck in portTASK_FUNCTION

1,322 次查看
sunnnn
Contributor I

Hi community guys:

      My freertos on 5748G stuck in portTASK_FUNCTION(), It can not switch tasks, I have already checked the pit configure, It seems configured correctly. Does anybody encounter the seem problem?

0 项奖励
2 回复数

1,202 次查看
FreeRTOS_org
Contributor IV

portTASK_FUNCTION() is a macro that wraps the functions that implement tasks (I think there is only one of the 40+ FreeRTOS ports that actually requires it, so it is likely implemented as an empty macro in your case), so you have accidentally not actually said which function you are 'stuck' in.  I'm going to guess you are taking about the idle task FreeRTOS-Kernel/tasks.c at master · FreeRTOS/FreeRTOS-Kernel · GitHub (that is a link to the source file in Github, in this post it has added the title of the page).

If you are in the idle task, then my question would be how do you determine you are stuck there?  It is likely your application will spend most of its time in the idle task, so it may appear you are stuck there as each time you pause the debugger you happen to be there. 

Is the RTOS tick interrupt actually executing?  You can determine that by inspecting the xTickCount variable in FreeRTOS/source/tasks.c, or just by putting a break point in the tick interrupt hander.

0 项奖励

1,204 次查看
sunnnn
Contributor I

hi Richard:

      Thanks for your response. Here is my debug test:

      1. I create 2 tasks(idle task is not included), And put breakpoint in each of them(in task while(1){}  body), So when task running, i can know it. 

      2. I put a breakpoint in tick interrupt handler, And disable the ' freeze bit ' to make sure it ticks in debug mode.

      result

      1. This 2 task run just for once. After create idle task. Freertos seems like stop task switch. Just run in idle task.

      2. The tick interrupt executing frequently.

      So does anything else i have ignored? Or maybe exists any other possibilities?

0 项奖励