Part Number: AM263P4-Q1
In the AM263Px MCU+ SDK 09.02.00 environment, we are measuring CPU load for a task running on Core1-0 with a 5 ms cycle using TaskP_loadGetTotalCpuLoad().
We are also measuring the task execution time using ClockP_getTimeUsec(). However, there is a significant discrepancy between the CPU load calculated from the task execution time and the CPU load reported by the API. What factors could cause this difference, and what should we check?
Below are examples of the measurements:
- 5 ms cycle task CPU load: 5.677%
- 5 ms cycle task execution time: 963.380 µsec
Since 963.380 / 5000 = 0.192676, the CPU load based on execution time should be about 19.2676%, but the measured CPU load is only 5.677%, which is much lower than expected.