Hello guys,
I am having a problem with my application.
MCU is a STM32L071CBT6 and currently it gets stuck when I use the vTaskDelay function.
The application is simple: 2 tasks
The first task initialize peripherals and then delete itself.
The second task is just a blinking led which blinks only once and then stops when vTaskDelay(delay) is executed for the first time.
I have tried to debug and found the application gets stuck in the while loop of this function in the task.c file: static void prvCheckTasksWaitingTermination( void )
Hi @migmel,
I think prvCheckTasksWaitingTermination is called by idle task, which means your task is getting suspended or deleted. It should be back after timeout if it’s just delayed.
Could you share your code on second task?
Otherwise, did you define configASSERT in your project? That helps if you actually hit an exception.
You should also enable stack checking .
Probably the stack size of status task is too small b/c you’re using stack hungry printf (family) function.
You should also check the return code of xTaskCreate to see if it was successful.
Hello guys,
Thank you for your help.
I started over from the ground and the problem disappeared.
I guess some configuration was wrong and it seemed easier to start over because debugging FreeRTOS is kind of hard to me.
Thank you all