Hi Champs,
I added the load module to the project. Now I want to read out during runtime. What is the best code to do so?
Is the following something you would recommend? It's from wiki SMP CPU Load.
Any other example you would refer to?
Measure the idle task load on each core and subtract it from 100. This will give the CPU Load on a given core.
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/utils/Load.h>
#include <xdc/runtime/System.h>
func() {
UInt load;
Load_stat stat;
Task_Handle idlTskHandle;
idleTskHandle = Task_getIdleTaskHandle(coreId);
Load_getTaskLoad(idlTskHandle, &stat);
load = Load_calculateLoad(&stat);
System_printf("Load = %d\n", (100-load));
}