This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Stellaris LaunchPad LM4F120 - PUR config problem

Hi all,

A am trying configure pullups in the PF0 and PF4 to works with de buttons installed in the Stellaris LauchPad.

Only pullup in PF4 works, the value of PUR register don't change to PF0.

This can be a GPIO_BLOCK problem?

I tried change the value of this register without sucess.

Anyone know about this?

My code:

ROM_SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
SYSCTL_XTAL_16MHZ);

ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);

ROM_GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1);
ROM_GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_2);
ROM_GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_3);
ROM_GPIODirModeSet(GPIO_PORTF_BASE, GPIO_PIN_4, GPIO_DIR_MODE_IN); // SW1 and Sw2 as Input
ROM_GPIODirModeSet(GPIO_PORTF_BASE, GPIO_PIN_0, GPIO_DIR_MODE_IN);


GPIO_PORTF_DEN_R |= GPIO_PIN_4;
GPIO_PORTF_DEN_R |= GPIO_PIN_0; // This is a Digita Inputs
GPIO_PORTF_PUR_R |= GPIO_PIN_4; // Pullups on S1 and S2 (HERE WORK)
GPIO_PORTF_PUR_R |= GPIO_PIN_0; // (HERE DON'T WORK)

Thanks,

Alessandro