LPC2106 external interrupts
2005-03-15 by Leonardo Santos
Hello All! I'm trying to write a simple interrupt routine for a external interrupt source (EINT0) for a LPC2106. As there's no selection between level or edge-triggered interrupts, I want to to wait until there's a logic 1 on the EINTx pin to clear the intrrupt on the VIC to not count a long strobe as several different interrupts. This goes along with the LPC2106 user's manual, as on page 40 it says that to clear a pending intrerrupt on EINTx I have to wait until there's a high level on the pin, so I REALLY want to wait until a logic 1 is present. But how do I do that? I already tried a code like this in my interrupt handler: (defines based on freeRTOS) while( (GPIO0_IOPIN & (0x01<<16)) == 0 ); SCB_EXTINT |= 0x01; VICVectAddr = serCLEAR_VIC_INTERRUPT; If I remove the while() loop; I get several interrupts, as expected. But if I leave the loop, after the first strobe on the pin, the processor gets stuck. Can I use the IOPIN register to read the current logic level on the pin? I think so, by reading the register description on page 81 of the UM. Thanks a lot -- Leonardo Pereira Santos Engenheiro de Projetos