I am working on CC2650 sensortag to generate precise timer interrupt. I need timer interrupt to be triggered every 500 ns.
Referring to CC2650 is running at 48 MHz, ideally it should be possible to generate a timer interrupt in nano seconds range. However, in my testing the smallest timer intterupt period that i can achieve is around 1.5 us
(i use oscilloscope to monitor BDP2 = IOID_23)
The following is my code:
void Timer0Isr()
{
TimerIntClear(GPT2_BASE, TIMER_TIMA_TIMEOUT);
PIN_setOutputValue(ledPinHandle2, BDP2, iTog); //BDP2 = IOID_23
iTog = (iTog ? 0 : 1);
}
void TimerSetup()
{
PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH);
PRCMLoadSet();
PRCMPeripheralRunEnable(PRCM_PERIPH_TIMER2); // Enables a peripheral Timer
PRCMLoadSet();
TimerDisable(GPT2_BASE, TIMER_BOTH);//TimerDisable(GPT0_BASE, TIMER_BOTH); // Timer disable
TimerConfigure( GPT2_BASE,TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_PERIODIC_UP ); // TIMER_CFG_A_PERIODIC );
TimerLoadSet(GPT2_BASE, TIMER_A, 2); // 100 = ~ 2us, 75 = ~1.5us, try to goes below has no effect
TimerIntRegister(GPT2_BASE, TIMER_A, Timer0Isr); // Link timer interrupt with Timer0Isr
TimerIntEnable(GPT2_BASE,TIMER_TIMA_TIMEOUT);// TIMER_TIMA_TIMEOUT); // Enables individual timer interrupt sources.
TimerEnable(GPT2_BASE, TIMER_A); // Timer Enable}
IntMasterEnable();
}
Is the delay due to call back function overhead? How can i achieve timer intterrupt below 1 us range?
NB: i have taken out POWER_SAVING setting this project
Thank you in advance. Any assistance from the forum / TI support will be very much appreciated.

