CPU Load on Infineon


I am running few tasks and hence, I would like to measure CPU load on Infineon TriCore microcontroller. Is there any predefined function/registers FreeRTOS already supports to measure CPU Load (May be in terms of CPU ticks and Idle task ticks)?

I would like to measure CPU Load on three different intervals:

  1. Single Core: The tasks are created only on Core 0 and I need to measure CPU Load.
  2. Multicore: The tasks are created on different cores, such as Core0, Core1 and Core2. How do I measure CPU Load?
  3. I also intend to use iSYSTEM debugger.

Could you please guide me on how can I measure CPU Load for the above mentioned points? (1. and 2.) ?

Looking forward to your valuable feedback.

Thanks in advance! :slight_smile:

Have you looked at FreeRTOS Run Time Stats which gives functions for total accumulated run time.

These give total usage, but you can save them at one point, then again at a second to get the load in that interval.

If you are only interested in total load, and not the load of individual tasks, then you can just look at the Idle task, and its load tells you how much “free” time you had,


Thanks, yes I would like to look at the overall CPU LOad.
How do I measure the IDLE task? Do you mean manually I need to create a timer to measure how long the CPU is holding the task in IDLE state?

Could you please shed some more clarity?

Thanks in advance! :slight_smile:

If you enable the run-time states, there is a function uxTaskGetSystemState that returns the run-time state information for ALL tasks, or you can use vTaskGetInfo for the information of just a single task (like the Idle task).


Do you have a snippet or an example where I can look and replicate it on Aurix Controller?


I don’t know that processor. The key point is does the processor have a high frequency (or cycle) counter that could be used to provide the basis for the run time counter.