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/TMS320C6657: Too long execution CPU cycles for reading from a timer register

Part Number: TMS320C6657

Tool/software: Code Composer Studio

Hi, 

I tried to test how many CPU cycles it takes to read from a register, using the code below. But the result is around 119 cycles simply to read a register. I believe this is not correct, so what might be wrong? 

Code is on L2 RAM, Many thanks

#include <c6x.h>

unsigned int start, stop;
unsigned int test = 0;

int main(void)
{

TSCL = 0; // need to write to it to start counting

start = TSCL;

// critical code
test = *((volatile unsigned int *)(0x02220020)); // SOC_TMR_2_REGS + TMR_INTCTLSTAT

stop = TSCL;
stop -= start; // stop will have the total number of CPU cycles

for(;;)
{

}
}