This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

lpc2138 interrupt problem code

hai
This is my code external interrupt is generates only one time next it is in not genetated.help me.

#include<lpc213x.h>
#include <stdio.h>
extern void init_serial(void);
unsigned char temp;
void EXTINTVectoredIRQ (void)__irq;
unsigned int x=0;
void EXTINTVectoredIRQ (void)__irq
{

x++;
x=x<<16;
IO1SET=x;
EXTINT=2;
VICVectAddr |=0; //(unsigned int)INTVectoredIRQ;

}
int main()
{ IODIR1=0X00FF0000;
IODIR0=0X00000000;
PINSEL1=0X00000000;
PINSEL0=0X200000C5; //interrupt pin p0.14
EXTMODE = 0; // LEVEL sensitive mode on EINT1
EXTPOLAR = 0;
//VICDefVectAddr = 0x0000002f;
VICIntSelect |=0x00000000;
VICVectAddr15 |=(unsigned int)EXTINTVectoredIRQ;
VICVectCntl15 |= 0x0000002f;
VICIntEnable |=0x00008000;
while(1)
{

IO1CLR =0X000000ff;
IOSET1 =0x000000ff;
} }

0