Hello,
The LPC1777 user manual claims the pin state of a GPIO pin configured as an input or output can be read from the PINVAL register. However, if I set the GPIO output as 1 or 0 using the GPIO PINSET and PINCLR registers, I when I read the state from PINVAL, the pin value is always returned as 0. The pin direction is configured as a GPIO output, when measured with a volt meter I see 3.3V and 0V on the pin. I'm using Port 0 pins 12 and 13. IOCON for Port 0 pins 12 and 13 is set to 0 (GPIO).
I am able to set the gpio output to 0 or 1 on Port 0, pin 0, and read the correct value from the PINVAL register, so there must be something with regards to Port 0 pins 12 and 13, but I can't find it in the manual.
Thank you.