API issue : ulTaskGetRunTimeCounter scope
Posted: Wed Apr 30, 2025 10:16 am
Hello,
I am currently on idf v5.4.1. As I was browsing the official FreeRTOS reference, I found 2 very similar functions that I need for my project:
1. ulTaskGetRunTimeCounter(xTasjk)
2. ulTaskGetIdleRunTimeCounter()
It appear they are doing the same thing: getting the cpu ticks utilized by a task : in case /1/ xTask is passed, ther task handle of the task we need to measure, and /2/ the 2 IDLE tasks are qquried , summed and returned.
For a reason that I can't understand, it appeard that /1/ is only available with SMP enabled (feat FREERTOS_SMP), but /2/ is available in all cases.
Am I missing something? Is there a reason for this?
Regards,
Alex
I am currently on idf v5.4.1. As I was browsing the official FreeRTOS reference, I found 2 very similar functions that I need for my project:
1. ulTaskGetRunTimeCounter(xTasjk)
2. ulTaskGetIdleRunTimeCounter()
It appear they are doing the same thing: getting the cpu ticks utilized by a task : in case /1/ xTask is passed, ther task handle of the task we need to measure, and /2/ the 2 IDLE tasks are qquried , summed and returned.
For a reason that I can't understand, it appeard that /1/ is only available with SMP enabled (feat FREERTOS_SMP), but /2/ is available in all cases.
Am I missing something? Is there a reason for this?
Regards,
Alex