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.

How much DSP time is being used by my program?



Hello,

         I think there is some tool in Code composer studio which helps us to know how much time is used by the DSP. Is it  currently not activated in CCS 4 for C2000?

Will I have this facility in latest CCS version?

 

  • Hi,

    Profiling functions are only available if you are using DSP/BIOS. If not you need to measure the time consumed by your program by toggling a GPIO.

    Example:

    SetGpioPin
    ....
    ....
    yourCode
    ....
    ....
    ClearGpioPin

    Other solutions are presented in this thread

    Best regards
    Andreas

  • Hello,

    two possibilities I often used:

    1.) Turn on the clock in CCS (menu Run -> Clock -> Enable & Show, on my Linux-CCS5). You will get a clock cycle counter in your status line which you can reset. After restarting the program you can measure the clock cycle number until arriving at the next breakpoint.

    2.) Start an internal counter (I recommend CpuTimer0) that is counting down with the full cpu clock. At your start point store the counter register (start=CpuTimer0Regs.TIM.all). At your stop point read it again (stop=CpuTimer0Regs.TIM.all). Just calculate the difference and you get the clock cycles.

    Best regards,
    Edwin Krasser