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.

GPTIMER Interrupt on CC2538 using Contiki

Hi,

How do I set the ISR function for GPTIMER 1A? Otherwise, does the following look correct?

Thanks,

Paul

void initISR(){
	//set up timer
	REG(GPT_1_BASE + GPTIMER_CTL) = 0; // off
	REG(GPT_1_BASE + GPTIMER_CFG) = 0x04; // 16 bit
	REG(GPT_1_BASE + GPTIMER_TAMR) = GPTIMER_TAMR_TAMR_ONE_SHOT | GPTIMER_TAMR_TAMIE;
	REG(GPT_1_BASE + GPTIMER_TAPR) = 1;
	REG(GPT_1_BASE + GPTIMER_TAILR) = 1000;
	REG(GPT_1_BASE + GPTIMER_IMR) = GPTIMER_IMR_TATOIM;
	REG(GPT_1_BASE + GPTIMER_CTL) = GPTIMER_CTL_TAEN;
	
	//set up interrupt
	nvic_interrupt_enable(NVIC_INT_GPTIMER_1A);
	//TODO: set ISR function
}