Hi,
In my project I want to measure the CPU load of my system using the SYSBIOS feature CPU load.
I am using: bios_6_35_04_50
And my target is: C2000 F28335
My sysbios settings:
Load.hwiEnabled = true;
Load.swiEnabled = true;
Load.taskEnabled = false;
Idle.idleFxns[0] = "&my_idle_function_1";
Load.windowInMs = 200;
Load.postUpdate = "&cpuload_callback";
My main:
void main(void)
{
...
BIOS_start(); /* does not return */
}
In the cpuload_callback function, is called the "my_sysbios_getCPULoad" function.
// Return the CPU load (time window of CPU load evaluation by default set to 200ms)
UInt32_t my_sysbios_getCPULoad(void)
{
UInt32_t cpu_load;
cpu_load = Load_getCPULoad();
return(cpu_load);
}
When I load the program with the JTAG, it works ie:
* the callback function is called by SYSBIOS and the value of CPU load returned by "Load_getCPULoad" is correct.
* on my system this CPU value is sent by CAN and is deplayed on a PC
When I power OFF power ON, the board, the value on the PC is 0.
When I connect the target with the JTAG, I can see that SYSBIOS does not call the callback function and the value of CPU load returned by "Load_getCPULoad" is Not correct (always 0).
In this state if I do with CCS: Menu Run-> Restart CPU, then Run then all is working properly.
Do you know where may come from the issue?
What do you have to check regarding SYSBIOS settings when it is not working? I can connect to the target and check some SYSBIOS variables ?
Thanks for your help
Regards,
Mathieu