I am trying to use the DSP/BIOS IDL_busyObj to compute CPU idle time, and hence CPU load, in bios 5.41.02.14 on a DM648. I understand how the 3 variables, IDL_busyObj.acc, IDL_busyObj.num, and IDL_busyObj.max are used to compute idle load. It works great in debug builds. However, in release builds,, the .num and .acc members are correct, but the .max is garbage (very large negative value). For some reason, the DSP/BIOS is not running the idle loop min cycle time calibration in the release build, though all of the bios settings are the same as in debug.
I tried adding
bios.IDL.AUTOCALCULATE=1; //auto-calculate idle loop cycle count
bios.GBL.ENABLEINST = true; //enable instrumentation
to the .tcf, just in case the defaults are different in release builds, but did not help.
Interestingly, when I run release build, and then start the CPU load graph in CCS (3.3), not only does it work, but suddenly the value of IDL_busyObj.max in my executable becomes valid! So, CCS is somehow kicking off the idle loop calibration, that is not being done by default by DSP/BIOS (again, problem is only in release builds).
Can anyone help me with this? Thank you in advance for any suggestions.
Jim Gort
loopCount = IDL_busyObj.num-loopCountold;
totalTime = IDL_busyObj.acc-totalTimeold;
curMinIdleLoop = IDL_busyObj.max;