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?
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?).
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.
Retrieving data ...