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.

cc2538 timer

Other Parts Discussed in Thread: CC2538

I am working on AC bulb dimming project using TRIAC. I use following code for 1 mesc timer

 

TimerConfigure(GPTIMER0_BASE, GPTIMER_CFG_SPLIT_PAIR |
GPTIMER_CFG_A_ONE_SHOT | GPTIMER_CFG_B_ONE_SHOT);


//
// Set the Timer0B load value to 1ms.
//
TimerLoadSet(GPTIMER0_BASE,GPTIMER_B,32000);

//
// The following call will result in a dynamic interrupt table being used.
// The table resides in RAM.
// Alternatively SysTickIntHandler can be statically registred in your
// application.
//
TimerIntRegister(GPTIMER0_BASE,GPTIMER_B,Timer0BIntHandler);

//
// Enable processor interrupts.
//
IntMasterEnable();

//
// Configure the Timer0B interrupt for timer timeout.
//
TimerIntEnable(GPTIMER0_BASE,GPTIMER_TIMB_TIMEOUT);

//
// Enable the Timer0B interrupt on the processor (NVIC).
//
IntEnable(INT_TIMER0B);

I  call timerEnable function for 7 times to get 7 msec delay. After that one pin of CC2538 goes hgh. I check that pin pulse on DSO. But frequency of that pulse is not constant. Can you please tell me how to calculate timer value.

How to use 32 bit timer . I want 2/4/6/8 mesc timer which is not possible in timerB .