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.

How to calculate Delay in C55x dsp's

Other Parts Discussed in Thread: CODECOMPOSER

if i was running at 32Khz clock 

lets us think in C55x one instruction takes 1MC,then for 1sec we can run 32000 instructions 

so if i want a delay of one second can i write?

for(i=0;i<32000;i++)

{

asm("NOP");

}

how to view whether i am calculating right or not how to view how many seconds does my instruction is taking on "Code Compser IDE"

for example in keil at bottom we can view the time elapsed through the simulator

 does codecomposer has the facility to view the MC executed between two break points ?

is my delay calculation above correct ? how many machine cycles does at C55x does take to execute a NOP? 

  • Hi Daram,

    You could look at the generated assembly... In CCS click on View -> Disassembly while stepping through the program.

    Or toggle some output pin before and after the delay to see on an oscilloscope the actual timing.

    Or you can setup and read a timer in C55x before and after the for loop.

    Not sure if the simulator has a time elapsed feature.. You could profile the code with the CCS profiler: http://processors.wiki.ti.com/index.php/Profiler

    1 NOP takes one machine cycle, but I prefer to use assembly called from C for delays of specific cycle count. You will see that the for loop takes more cycles than the below code. Check the disassembly for the reason.

    asm(" rpt #32000 " );
            asm    (" NOP ");

    Hope this helps,
    Mark