Other Parts Discussed in Thread: TM4C1294NCPDT
Hello,
I'm working on a project where I needed to set one of the pins as an input, with a pull-up. So I wrote the following:
GPIOPadConfigSet(GPIO_PORTM_BASE, GPIO_PIN_3, GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD_WPU); GPIOPinTypeGPIOInput(GPIO_PORTM_BASE, GPIO_PIN_3);
I tested it and the weak pull-up wasn't working. The pin is connected to a simple jumper to ground that can be installed or removed. After a bit of troubleshooting, I found that the GPIOPadConfigSet() call had to be after the GPIOPinTypeGPIOInput() call, hence the working code was:
GPIOPinTypeGPIOInput(GPIO_PORTM_BASE, GPIO_PIN_3); GPIOPadConfigSet(GPIO_PORTM_BASE, GPIO_PIN_3, GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD_WPU);
Part is TM4C1294NCPDT, TivaWare version is 2.1.0.12573. Anyways, in case anyone had a similar issue, this resolves it.