How to measure CPU usage using CMSIS FreeRTOS?
Hi! How do I measure CPU usage for every task in CMSIS FreeRTOS?
I enabled all run time and task stats gathering related definitions (GENERATE_RUN_TIME_STATS, USE_TRACE_FACILITY and USE_STATS_FORMATTING_FUNCTIONS) in STM32CubeIDE GUI.
When I call vTaskGetRunTimeStats(), nothing is returned. The function uxTaskGetSystemState() inside vTaskGetRunTimeStats() returns that the task used 0 clock cycles every time.
Do I need to set a timer or redefine some functions to get things working? How to do that?
P.S.: I don't know if this is the correct place to ask about this.
Thanks in advance.