This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Idle Time Calculation

Other Parts Discussed in Thread: TMS570LS0432

In TMS570LS0432 Hercules Launchpad, I use freeRTOS. To calculate CPU Idle Time(with some tasks created), I ran HET at the Background and a variable incrementing inside IdleTask when it runs on CPU. At 200th ms, I recorded the variable value. Now I doubt as to what should be the denominator value if this variable count is taken as numerator value to calculate Idle time of CPU. Kindly suggest a solution for this.

  • Sindhu,

    For something simple, why don't you simply run just the idle task plus HET to get a count for 100% IDLE at 200ms.   Then use this # as your denominator when you have other tasks running.

    This won't be terribly accurate but I think it will be good to a first order.

    -Anthony

  • Hello Seely

    I tried the suggestion from your side. I see 3% difference between this idea and the result from a FreeRTOS API. With FreeRTOS API ( vTaskGetRunTimeStats() ) the Idle time is 97% whereas with HET its 94% . Any other suggestion from your end to achieve accuracy?