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.

measuring CPU cycle of LCDK6748 and CCS v6

Hello,

i'm using LCDK6748 and CCS v6.. i want to measure the CPU cycles of my code..

i have tried the method as explained on http://processors.wiki.ti.com/index.php/Profile_clock_in_CCS

i already make 2 breakpoint lies in between the code..

but it seems that the clock counter will automatically starts everytime i resetting the counter..

is there a way to measure c CPU cycles on LCDK6748 and CCS v6?

thank you

  • Hi Franz

    Franz Kurniawan said:
    but it seems that the clock counter will automatically starts everytime i resetting the counter..

    Are you halted and you reset the clock (via double-clicking on the clock icon) and the counter starts counting while you are still halted?

  • Hi ki-soo..

    Yes.. im halted at the first breakpoint i put before the function i wish to measure..

    then i reset the clock counter by double clicking the clock icon..

    after resume, the clock counter is very large, it is depends on how long time i pause after resetting the counter..

  • Franz Kurniawan said:

    Yes.. im halted at the first breakpoint i put before the function i wish to measure..

    then i reset the clock counter by double clicking the clock icon..

    after resume, the clock counter is very large, it is depends on how long time i pause after resetting the counter..

    Ok. This is expected behavior. You reset the clock and then resume and the next time you halt, it will show the cycles executed since when you reset the clock (assuming the clock is configured to count cycles). If you don't want it to automatically start counting after resetting the clock and resuming execution, you can disable the clock.

  • if i disable the clock, then it will not show the clock cycles quantity..

    my purpose is to measure the machine cycles of my function..

    so i put 2 breakpoints which are lied just before the function and after the function..

    is there a method to measure the machine cycles of the code i make?

  • Franz Kurniawan said:
    so i put 2 breakpoints which are lied just before the function and after the function..

    This is correct. You enable the clock, run to the first breakpoint, clear the clock, then run to the second breakpoint see the cycle count. This is all you need to do.