How do I verify if my tick interrupt is running in freertos?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Sunny
Level 2
Level 2
10 sign-ins 5 replies posted 5 questions asked

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
Level 3
Level 3
10 replies posted 5 replies posted 5 sign-ins

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
Moderator
First question asked 1000 replies posted 750 replies posted

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
Level 2
Level 2
10 sign-ins 5 replies posted 5 questions asked

I am passing 50 as value

0 Likes
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi @Sunny 

Please share your project to debug the issue.

Regards,
Bragadeesh
0 Likes
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

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
Level 3
Level 3
10 replies posted 5 replies posted 5 sign-ins

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

0 Likes