Hello! I'm trying to set a GPIO with a pull-up resistor, but I am always reading zero from the pin, no matter the input value
I'm configuring it like this:
gpio_pin_config_t config;
config.direction = kGPIO_DigitalInput;
config.interruptMode = kGPIO_NoIntmode;
GPIO_PinInit(GPIO2, 9U, &config);
IOMUXC_SetPinMux(IOMUXC_GPIO_B0_09_GPIO2_IO09, 0U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_B0_09_GPIO2_IO09, 0x90B0U);
I've got the value 0x90B0 from the code generated by the pin config tool
If you look at page 693 of the reference manual, that should set a 100kohm pull-up
I've tried with 22kohm and 47k as well to no avail.
Is there anything I'm missing here?
This pin is connected to a switch that when pressed shorts the pin to the ground, so when the switch is not pressed it should read 1, right? But I'm always reading zero
Any help will be greatly appreciated