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/TMS320F28377S: Cycle Count difference

Part Number: TMS320F28377S


Tool/software: Code Composer Studio

Hello

I'm using the  Profile Clock in CCSv8 to measure how many cycles a loop takes. I was able to get a number (around 10000 cycles, for example). However, while single stepping through one full loop I got a much smaller number (below 2000 cycles per loop). I used a hardware breakpoint for the first method.

Is there something wrong with the way I'm measuring this? What could be causing such a big difference? I'm reading some data from Flash during this loop, so could it be Flash wait states causing this? 

Thanks for the help

  • Hello Lucas,

    There are several potential factors and it is difficult to determine which one could be the cause without a test case. One that comes to mind is if interrupts are being serviced while running through the loop. The time in the ISR would be part of the 10K count. 

    Thanks

    ki

  • Maybe there are interrupts I'm not aware off? I certainly did not add any interrupts to the code, since it's a simple processing loop. There are no timers or communication interfaces at this point in the code. Is there a place listing the most common factors for this kind of behavior? Thanks for the help.
  • There is no comprehensive document that lists all the potential causes. The best is to provide a small reproducible test case. The test case should be as simple as possible (with least amount of dependencies) but able to reproduce the issue.