Hello,
I wish to measure the CPU utlization for a cortex processor running an RTOS (keil RTX). Without an RTOS, i can measure the idle time to come to some conclusion. But with RTOS, can someone guide me how to measure CPU utlization?
Thanks & Best Regards Vivek
Hi Vivek,
As suggested in this thread, I am also trying to measure the idle time , etc and arrive at CPU util using the logic analyzer.
However, I am curious to know ("Without an RTOS, i can measure the idle time to come to some conclusion"), how / which method did you use for this?
Regards Padma
Hi Padma,
I used Stuart's method. Inside the while (1) loop, i keep incrementing a counter variable. I reset the variable periodically. The period is something that i defined. (say 10 ms). I used to store these data in an array to make an iterative measurement.
Iam equally curious about your method using a logic analyzer. (though i dont have one to ake use of)
hope this helps.
BR/ Vivek
Hello All,
When i make repeated measurements, i observe that sometimes, i get values that are twice or thrice the value i get most of the times.
For ex i get CPU_idle_time_counter = 0x00057E34 most of the times, but i also get 0x000AFC68 and 0x00107A9D.
I couldnt think of any reason why this could happen. Idle task is not executed. That is clear. But is it OK to ignore such values.
Vivek
interrupts during measurement?
i dont have any interrupts enabled in my program. After i set up the clock, initialize a timer, enable it and go into a while(1) loop with a variable (counter) to make idle time measurement. With this simple code, i didnt even attach my application.
View all questions in Keil forum