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 中的clock与实际运行时间



在CCS(5.5.0)中修改代码,debug后显示的clock比原来有减少,但是在上板(6678)跑的时候用示波器测时间,时间反而比原来增加了,这是怎么回事?

  • 示波器测量不准。可以通过在测试程序前后读取TSCL/TSCH寄存器的方式获得程序的运行时间。请看c66x cpu user guide.
    2.9.13 Time Stamp Counter Registers (TSCL and TSCH)
    www.ti.com/.../sprugh7.pdf

    使用参考如下:

    TSCL=0; //初始化为任意值使能TSC时钟计时

    start = TSCL;

    c = a*b;

    end = TSCL;

    cycle = end - start;