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.

CPU load DSP/BIOS

Other Parts Discussed in Thread: CCSTUDIO

I'm working with a DM648 and DSP/BIOS 5.31 with CCS 3.3.  I know that I can get the CPU load graph in CCS.  I would like to get the CPU load as a variable within my program so that my host processor, connected to the serial port can read the CPU load.  This is important because the host processor can start/stop various processing and needs to know if the DSP is running out of processing power when not connected to the emulator.

 

DSP/BIOS obviously has this information, but how to I access it as a variable in my code?

 

Many thanks,

Simon.

  • Simon Roper said:
    DSP/BIOS obviously has this information, but how to I access it as a variable in my code?

    I don't know of a good example of this being done, however it should be possible, note that the CPU load is not directly available in BIOS, that is you would have to calculate it based on the statistics that BIOS collects, in a debug scenario this calculation is done on the host CCS side. You may want to take a look at section 3.5.2 of SPRU303b, this describes how the CPU load is calculated for a BIOS application in detail.

  • Thanks,  I can understand how the calculation is done in SPRU303b but have been unable to implement it in the DSP.  I can't find the variable I1, the number of instructions the idle loop takes to run.

     

    I did stumble across this example though which has a function to get the CPU load from the information DSP/BIOS captures and stores.  I believe this is doing the calculation described in SPRU303.  Very easy and useful.

    C:\CCStudio_v3.3\bios_5_31_08\packages\ti\bios\examples\advanced\stairstep

     

    I suggest the BIOS user guides should have references added to the examples applications provided with DSP/BIOS, this would make leaning a new part much easier.