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: execution time profiling

Tool/software: Code Composer Studio

Can someone tell me how to do execution time profiling in c2000 microcontrollers? I want to know how much time (machine clock cycles) each section takes.

  • Hello,
    You can use the profile clock to count cycles:
    downloads.ti.com/.../

    Please note the C2000 has a very limited number of hardware breakpoint resources and the profile clock will use one of them. If you are trying to profile code in flash, you will likely run into this limitation (see link below):
    downloads.ti.com/.../

    Thanks
    ki
  • Hi Ki

    Right now I am using the clock to find out how many cycles are being done for the running of an entire loop. Actually I wanted to know how much time each section is taking. i.e. time taken for the PID controllers, clark/park transformations, speed estimation etc. But since ctrl_run is an inline function, I am not able to put breakpoint inside it at several places. Which is why I wanted to see if there is any counter variable that records the number of cycles. So that I can store the value after every section I'm looking at.

    Thanks and Regards

    Amrutha

  • Also, the speed and current PID loops work only when the condition satisfies the number of ticks. When I tried to remove that 'if' condition, the program is not going into the 'CTRL_runOnLine_User' function.