Hi everybody! I need some help. I 'm trying to blink a led by using Timer0 and an IRQ Routine on a LPC2129. I know my Timer work well (bit 0 in TOIR is generated about 900ms) But I don't understand why it never launch my ISR routine. I put a breakpoint and it never go there.
Maybe someone can help me to resolve it! he would be nice! Thank you.
#include <stdlib.h> #include <LPC23xx.H> #define Fpclk 12000000 char data; void TIMER1_ISR(void) __irq { //VICSoftIntClear=0xFFFFFFFF; //Clear all interrupts T0IR = 0x01; // set match 0 T0TCR=0x03; //counter reset if(IOSET1==0x10000){ IOCLR1 = 0x10000; } else if (IOCLR1==0x10000){ IOSET1 = 0x10000; } } int main( void ){ IODIR1 = 0x10000; //init VIC VICIntSelect=0x00000000; //all interupts: IRQ VICIntEnable=0xFFFFFFFF; //all interupts : enabled VICVectCntl4=0x00000014;//Uart interupt selected and enbled VICVectAddr4 = (unsigned long)TIMER1_ISR; //adress of the irq routine PCONP=0x02; //do not activate power saving T0MR0 = Fpclk - 1; // when T0TC arrived to 1 seconde (12000000 ticks) , the match between T0TC and T0MR0 do an interuption T0PR = 0x00; //1 incrementation every tick T0MCR = 0x07; //stop ,reset,interuption enabled when timer 0 match to match0 */ T0TCR = 0x01; //start counter while(1); }