cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6

Sunny
New Contributor II

When I create a task, it seems to run just fine.  But as soon as I call any blocking function (vTaskDelay), the app never seems to re-enter the Ready state. I have configTICK_RATE_HZ is defined in FreeRTOSConfig.h.  Is there anything else I can look at? 

0 Likes
1 Solution
ARH
New Contributor II

The best way is to make a simple blinking led task.... turn off all of the others... then run it.

Then turn task at a time back on.

 

I always start from a simple freertos template that I have built into Modus Toolbox ... I program it to make sure that everything is working... then I start adding tasks back.

https://iotexpert.com/modustoolbox-2-2-template-project-freertos-ntshell/

 

ARH

View solution in original post

0 Likes
5 Replies
BragadeeshV
Moderator
Moderator

Hi @Sunny, Can you let us know the value you provided to the vTaskDelay function?

There is a hook to the tick interrupt you can use that to verify if the tick interrupt is occurring (configUSE_TICK_HOOK ). Check FreeRTOS documentation for details.

Regards,
Bragadeesh
0 Likes
Sunny
New Contributor II

I am passing 50 as value

0 Likes
BragadeeshV
Moderator
Moderator

Hi @Sunny 

Please share your project to debug the issue.

Regards,
Bragadeesh
0 Likes
RodolfoGL
Employee

You can call the function xTaskGetTickCount().

https://www.freertos.org/a00021.html#xTaskGetTickCount

It returns how many ticks it passed since starting the scheduler.

0 Likes
ARH
New Contributor II

The best way is to make a simple blinking led task.... turn off all of the others... then run it.

Then turn task at a time back on.

 

I always start from a simple freertos template that I have built into Modus Toolbox ... I program it to make sure that everything is working... then I start adding tasks back.

https://iotexpert.com/modustoolbox-2-2-template-project-freertos-ntshell/

 

ARH

View solution in original post

0 Likes
Top labels