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.

[C2000] How accurate the counting clock function is ??

Dear Champs,

We knew that we could use the counting clock function  to get the running clock cycle.

Our customer raise their voice for this function.

They try to use different method to implement their project.

One is to use the function within their  own library file and another is to create project with C source file.

However they get different counting result between two method.

When using within-library method , the counting cycle will be larger than the method with C source file directly.

The assembly is absolutely the same.  I calculate the cycle number that it should be 14 cycle but the results i got are different.

Some instruction will be larger than the cycle number in the datasheet ( plus 2 cycle).

Is there anything wrong when we want to operate this evaluation ?  or something we miss??

BR

Brian 

 

 

  • Brian,

    I am not entirely sure if I completely understand your post, but I will give it a try.

    Are they trying to compare the number of clock cycles between one function that is built into a library and another written in their source code?

    If so, how different are the two counts? If they are different by several thousands of cycles, then there seems to be an issue with the profiler or the system is skewing the count due to other events (interrupts, DMA, etc.)

    For a more complete description of the possible scenarios that can cause this behavior, check the last section of the Profile clock wiki page at:

    http://processors.wiki.ti.com/index.php/Profile_clock_in_CCS

    Hope this helps,

    Rafael

  • Hi Rafael,

    Thank for your supporting. I thought the accuracy is enough.

    The root cause seems to be related with the pipeline operation.

    I got the same result when i arrange them in the same flash memory address.

    Thank you.

    BR

    Brian