Reply by jonaschristensen53 July 30, 20082008-07-30
Hey

We found the problem. It was a circet without hysteresis that was
connected to the input pin.

Special thanks to Kees from NXP who helped trouble shoot.

An Engineer's Guide to the LPC2100 Series

Reply by jonaschristensen53 July 28, 20082008-07-28
Hey.

Rising Edge interrupt on GPIO Port 0 and Port 2:

Acording to the manual there are 4 external interrupts. EINT0, EINT1
and EINT2 are for specific port pins but EINT3 can be used for 1
specific pin and Port 0 and Port 2 pins..

I've setup external interrupt on rising edge for EINT3 and set Port0,4
for rising edge interrupt. But my interrupt are not edge triggered but
level triggered(Used a capacitor to slowly decharge the pin and it
fires multiple interrupts at about 3v). I tested EINT0 and used the
specified Port, and it works fine.

Am I doing something wrong?

Regards
Jonas Christensen, Denmark.

Sample of my code;

void init(void) {
//set port0,4 and port 0,5 to GPIO
PINSEL0 &= 0xFFFFF0FF;

//set EINT3 to edge sensitive
EXTMODE = 8;
//set EINT3 to rising-edge sensitive
EXTPOLAR = 8;
//need to clear this bit acording to the manual.
EXTINT = 8;

//enable rising edge interrupt on port0,4 and port0,5
IO0IntEnR = 0x10 | 0x20;
//Now enable EINT3 interrupt.
//Use Crossworks and and CTL API.
ctl_set_isr(17, 0, CTL_ISR_TRIGGER_FIXED,EdgeTrigger, 0);
ctl_unmask_isr(17);
}

void EdgeTrigger(void) {
//check if rising edge interrupt on port0,4
if (IO0IntStatR & 0x10) {
//do something....

//clear interrupt
IO0IntClr = 0x10;
}
}