This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Calculate CPU load onto C6713 ?

Hello,

i try to get the CPU load of my C6713 DSP directly from my application (without using TI tool) in order to make internal decision base on the CPU load. I am working with C3713 and  DSP/BIOS version 4.90.270 (code composer studio 2.21.00).

In order to do that, i take information from IDL_busyObj like this (after enable RTA in the .cdb file):

STS_Obj* pIDL_busyObj = &IDL_busyObj;
 
    for(;;) {
        oldCSR = HWI_disable();
        loadCpu = pIDL_busyObj->max;
        HWI_restore(oldCSR);
    }

 

My problem is that, from the documentation i need to get the  l1 (the number of instruction cycles spent in the idle loop) :

"The information contained in IDL_busyObj is used to calculate the CPU load. The IDL_busyObj count provides a measure of N (the number of times the idle loop ran). The IDL_busyObj maximum is not used in CPU load calculation. The IDL_busyObj total provides the value T in units of the high-resolution clock.To calculate the CPU load you still need to know l1 (the number of instruction cycles spent in the idle loop). When the Auto calculate idle loop instruction count box is checked in the Idle Function Manager in the Configuration Tool, DSP/BIOS calculates l1 at initialization from BIOS_init. The host uses the values described for N, T, l1, and the CPU MIPS to calculate the CPU load as follows: CPULoad = [1 - (N*I1)/(M*T)] * 100".

Is where a way to get CPU load easier ? If not, how to retreive thenumber of instruction cycles spent in the idle loop from my application code ?

Thank