Main Site Documentation

G400 Cpu load


#1

dear sir, madam

i would like to monitor the G400 cpu load for diagnostic issues.
is there any way to get this information?

KR
herbert


#2

NETMF does not provide this.


#3

Technically no processors do that. If you want that function, you could start a thread on a infinite loop that toggles a pin on and of. The frequency of the toggling will tell you how often the task is being scheduled on the processor, which will give you an idea of how much time the rest of your application is staying on the cpu.


#4

Gus and Mr Smith are right that this is not built into netmf in any way, but I’d also be curious what you are trying to instrument as there might be alternative ways of getting that info. Are you looking for the ratio of interrupt-servicing to interpreter execution time? Are you looking for the ratio of interpreter instruction execution to wait (idle) times (Thread.Sleep()) and context-switch overhead? Are you looking for the execution cost (cycle count) ratios between threads? CPU load at the machine instruction level on an MCU is by definition 100% if the MCU is not in a power-saving sleep mode, so you need to define what you mean by ‘load’.

All of the above could be collected by adding a bit of code to the netmf interpreter and some could be collected in managed code, but how depends on what you’re trying to observe.