i m using EINT 2 on port P0.a5 on LPC 2148
here is my code ..can anyone guide me pls..
PINSEL0 = 0x80000000; //Select P0.7 for EINT2 VICIntSelect = 0x00; VICVectCntl1 = 0x20 | 0x10; //EINT 2 is selected VICVectAddr1 = (unsigned long) intr2_srv; VICIntEnable = 1<<0x10; EXTMODE = 0x04; EXTPOLAR = 0x04; // HIGH Level
Since we're talking about an external interupt, note that includes harware debugging - have you verified that a valid signal is actually present at the required input pin...?
yes i have connected a wire to am giving high to low pulse..n m checking the singal on port0.15.
and i have also timer to give delay ...so when i comment interrupt part its running fine. but when i start interrupt led doest glow..
So maybe your interrupt does work, but your interrupt handler doesn't acknowledge the interrupt?
You see - you haven't shown us what your ISR looks like.
i have also checked in debugging that interrupt is selected ...(keil debugger).
this is the interrupt routine...
void intr2_srv (void) __irq { manual(); T0IR = 0x01; EXTINT |=0x04; //clear interrupt VICVectAddr = 0; // Acknowledge Interrupt } void manual() // For blinking LEDs after 1sec delay. { IOSET0 =0x00000001; timer0(2000); IOCLR0 =0x00000001; timer0(2000); }
pls give some idea...