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.

CCS/TMS320F280049: Calculate throughput of the Microcontroller

Part Number: TMS320F280049

Tool/software: Code Composer Studio

I am trying to calculate the execution time of a block of code written in C (e.g. PWM, ADC block, SPI) in Code Composer Studio for TMS320F280049. I do not have hardware yet. Without loading/burning the code in actual hardware/controller, is it possible to calculate/view code execution time from the CCS software only?  

  • Hello Manish,

    CCS does not offer Emulation ability. It requires Hardware to run the profiler clock.

    Generally, you can look at the assembly that is generated and step through, counting the number of cycles. Might be best to only do small chunks of code as you will be hand counting cycles.

    If you have an F28379D board, or any from within that family of devices, you can load your PWM, ADC, SPI code into there and run the profiler.

    I will ask around if anyone else has thoughts on how this might be possible.

    -Mark
  • Hi, I received some further confirmation, that you can only profile with hardware.

    To enable the profiler clock: In CCS under Run->Clock and this will enable the little clock on the lower right hand area of CCS which shows the number of CPU cycles between debug halts. You can put a breakpoint at the beginning of the code section you wish to time, enable the clock, reset it, and then run to another breakpoint. the number of CPU cycles executed can be multiplied by your CPU SYSCLK frequency period and you have the amount of time spent in that code section.

    Thanks,
    Mark