lpcware

no GPIO functionality for PIO0_11 to PIO0_14

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by LpcWare159 on Wed Jan 07 05:51:30 MST 2015
Hi all.

I'm using the LPC11U68 Xpresso v2 board to read the pin state of PIO0_14. It always reads zero while the pin is pulled high externally and measures +3.3V. If I do the same with PIO0_9, it works fine and the MCU detects the level change. PIO0_11 to PIO0_14 are configured to use their dedicated function 1, according datasheet. It seems the GPIOs are working op port0 except for PIO0_11 to PIO0_14. Is there anything else to setup specifically for these pins other than this code?

<code>
int main(void)
{
    Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 9, IOCON_MODE_INACT | IOCON_FUNC0);
    Chip_GPIO_WriteDirBit(LPC_GPIO, 0, 9, false);
    Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 14, IOCON_MODE_INACT | IOCON_FUNC1);
    Chip_GPIO_WriteDirBit(LPC_GPIO, 0, 14, false);
    while(1)
    {
        if(Chip_GPIO_ReadPortBit(LPC_GPIO, 0, 14))
        {
            Board_LED_Set(1, true);
        }
        else
        {
            Board_LED_Set(1, false);
        }

        if(Chip_GPIO_ReadPortBit(LPC_GPIO, 0, 9))
        {
            Board_LED_Set(2, true);
        }
        else
        {
            Board_LED_Set(2, false);
        }

    }
}
</code>

Outcomes