vDelayTasks hangs MPC5748G

Hi all,

I am developing an application using the MPC5748G and FreeRTOS. I use the vDelayTask to let an LED blink with 1Hz in order to give feedback to the user that the code is running.
Every time I newly flash the microcontroller, it seems that the vDelayTask hangs up the microcontroller as the LED only lights up, and afterward nothing is happening. After pressing the reset button on my development board, the code executes properly and the LED is blinking as expected.
So the problem only seems to be occurring after I flash the board and press resume in the debug window. After resetting it works.
I already checked several threads covering similar problems, but there was no solution for my specific problem.

Thanks for any further suggestions.

Best regards

I’m not familiar with the chip or port you are using, but this kind of issue is normally caused by the way the tools are resetting the device. When you hard reset the system comes up clean, but resetting through flash tools or a debugger normally has several reset options, not all of which actually reset the chip.

Thanks for the reply. But if I use an older example project I don’t have this issue although the debug configuration settings etc. are similar. So I figured I did something wrong with FreeRTOS.
It freezes whenever I call vDelayTask (regardless in which task, i checked several) the first time as if the TickCount is not increased.

I did some further research. I nailed down my code to just start one Task which at some point calls the function vTaskDelay.
At the beginning of the task and in the middle of the task I call the function xTaskGetTickCount() to get the current tick count.
After I flash the board I get a value of 0 the first time I do xTaskGetTickCount() and a value of 0 the second time.
After I pressed the reset button I see that the value of xTaskGetTickCount() is 0 the first time I execute it and is something around 15 the second time I execute xTaskGetTickCount().

Therefore, I think for some reason the TickCount is not increased after I flash the device.

…still sounds like a board reset issue. If the tick count does not increment then vTaskDelay() will never return because the time at which the calling task should return is never reached.