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

Can't read state of PIN configured for Capture

I am using the MCB2140 which is built around the LPC2148 mcu. My application configures P0.2 to work as a capture pin(PINSEL0 = (PINSEL0 & 0xFFFFFFCF) | 0X20;). The Capture control register is setup to trigger on either rising or falling edge and to generate an interrupt(T0CCR = 0x07). This all works fine. The problem I experience is while the code is executing the interrupt I use the FIO0PIN to read the state of the P0.2 pin to get an idea whether the pin is currently high or low. This doesn't work. FIO0PIN always reports a 0 on P0.2 pin even though the pin is pulled high. My understanding is it should report the pin's state according to the LPC2148 user manual, "The current state of digital port pins can be read from this register, regardless of pin direction or alternate function selection."

How do I get the FIO0PIN to report the high state of the P0.2 pin?

0