Hi i am trying to set up an overflow timer interrupt on Timer 3 of an 8051. The code is getting stuck in the interrupt routine. i am using the 2511F32 (wixel)
Here is the interrupt setting code:
{ ......
T3CTL |= 0xE0; // set prescaler to tick frequency / 128 (DIV) bits 7:5
T3CTL |= 0x04; // Clear counter value (CLR - bit 2)
T3CTL |= 0x00; // Timer mode set to free running (00) bits 1:0
T3CTL |= 0x08; // Enable overflow interrupt (OVFIM) bit 3
T3CCTL1 &= ~0x40; // disable timer compare interrupts
T3CCTL0 &= ~0x40; // disable timer compare interrupts
IEN1 |= 0x08; // Enable Timer 2 interrupts
T3CTL |= 0x10; // Start the timer (START - bit 4)
EN = 1;
......
}
Here's the interrupt routine code
ISR(T3,0)
{
TIMIF &= ~0x07; // T3OVFIF Clear T3 overflow interrupt flag - bit 0
LED_YELLOW_TOGGLE();
}
It remains trapped in the ISR routine. There are no other interrupt flags to clear. Any ideas ?