Hi,
Am using the Timer 1 in CC2530 to operate in Modulo mode, inspite of setting the needed timer registers correctlly the Timer simply work . I want an interrupt on the compare value match, Ive set IM bit and the mode field in T1CCTL0 accordingly. Also ive enabled the global interrupt and the Timer 1 overflow interrupt , i start the counter from 0x0000 but i dont get an interrupt on the match value. Even if i start the counter with a value above the compare value i do not get the overflow interrupt.
With the same register setting am able to run the timer in free run mode and up down mode with proper interrupts on the overflow condition. What can be the issue am i missing something in the configuration?
T1CTL &= ~0x03; //Disable Timer]
T1CTL &= ~0x0C; //Clear prescalar
T1CTL |= 0x04; //Set prescalar to 128
T1CNTL = 0x00; //set the count value to 0
T1CNTH = 0x00;
T1STAT |= BV(5); //Enable the overflow interrupt
IRCON |= BV(1);//Enable the Timer 1 interrupt
T1CTL |= 0x02; //Start the timer in Modulo mode
T1CCTL0 |= 0x44; //Interrupt on compare and compare mode