Hi guys,
Fairly new to the board and the processor, I cannot somehow get my timer to run on the evaluation board (EVMOMAPL137 from Spectrum Digital).
I am using the bsp provided by them. The timer works perfectly fine for the dsp. But when i try to use the same code for arm, it somehow does not work.
Timer initialization
void TimerInit(unsigned short timerId)
{
timerId = timerId;
//Use Timer 0
TIMER0_TGCR = 3; //0bxx...0011, reset, 64bit general purpose timer.
TIMER0_PRD12 = 0xffffffff; //Period, lower limit, equ. (0x1 0000 0000 * 1/24) us, e..g, 1 clock tick = 12.5 dsp clock
TIMER0_PRD34 = 0xffffffff; //peroid, higher limit
TIMER0_TRC = 0x00000080; // continous timer
}
Reading timer registers
unsigned int GetTime()
{
//WARNING: THIS TIMER DOES NOT HAVE OVERFLOW DETECTION
return TIMER0_TIM12;
}
Calling timer from main
void main(void)
{
unsigned int i,tRef,tRef2,tRead,t1,t1Again;
int q=0;
TimerInit(0);
tRef = GetTime();
tRef2 = GetTime();
}
Any help would be appreciated.
Thanks,
Sh