Strange LPC2138 EXTINT0 behavior
2005-10-29 by r_bottleneck
Hello,
I'm rather new with LPC21xx, therefore I would like to ask the
experts a question regarding a strange behavior I discovered in my
application.
I'm using a LCP2138 which gets external interrupts via EXT0 and some
other internal interrupts. Basically my application works so far.
However, it seems that something strange happens if the interrupt
occurs around the instruction
....
VICIntEnClear = INT_EXT0; // disable EXT0 (INT_EXT0=0x4000)
....
I need to disable the interrupt at the beginning of some certain
functions and I need to enable the interrupt again at the end of these
functions.
Thousands of time it works pretty well. The result in this particular
case however is , the program continues anywhere (I don't know where)
and after hundreds of microseconds it comes back anywhere in my
application.
I checked the external interrupt line, there are no spikes etc.
My question now is, what reason can cause that behavior and how can it
be prevented ?
Thanks a lot for any help.
Regards