AnsweredAssumed Answered

External indication of processor utilization

Question asked by David Pfaltzgraff on Mar 10, 2015
Latest reply on Mar 16, 2015 by Matthew Kendall

I am using the combination of KDS, KSDK, PE and MQX, but the question may be of more general interest for any OS.


Is there anyway to externally measure the level of processor utilization? In working with MQX, I see that the idle task merely increments a huge number. But, translating this to a meaningful value requires that I have easy access to it as well as knowing the total run time, etc. What I would like is an easy way to measure this without having ti halt my system and access the memory.


For example, if a port is dedicated and the corresponding bit is cleared on entry to the idle task and set when switching away from it, this could be applied to a low pass filter (a simple RC) with the resulting voltage being proportional to the processor utilization.


An added bonus is that looking at the port output with a scope, you could get an idea of how much time the scheduler spends in switching among the various tasks.


If anyone has done this, I'd be interested in their results.