AnsweredAssumed Answered

Timer2 IRQ is only executed Once

Question asked by drakesoft on Nov 7, 2012
Latest reply on Nov 19, 2012 by drakesoft

Hello, i have a Problem with the Timer2 IRQ. The Timer2 generate a Interrupt only once. IRQSTA[4] and IRQSIG[4] remaining true. The timer is counting in 10ms intervals. My programm use the VIC extention of the ADUC7126.

 

void init_timer2 () {

    T2CON = (1<<6) | (1<<7) | (1<<10);

    T2LD = TIMER2_LD;   

    T2CLRI = 0xFF;

}

void timer2_clr_irq ( void )  {

    sched_irq();       

    T2CLRI = 0xFF;

}

 

__asm void IRQ_Handler ( void ) __irq {

    STMFD  SP!, {R0-R12, LR}

 

      LDR R0,=0xFFFF001C

      LDR R0,[R0]

       LDR R0,[R0]   

 

    CMP R0,#0

    mov R14,PC

  BXNE R0

 

    LDMFD  SP!, {R0-R12, LR}

    SUBS PC,lr,#0x4

}

Outcomes