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.

TM4C123GH6PM: PB5 on TM4C123G launchpad not working

Part Number: TM4C123GH6PM

I am currently using several GPIOs, two SSI channels and two I2C channels in my project.  Everything was going well until I added PB5 as a GPIO output for controlling an ADC CS pin.  I have a scope on the pin at the booster pack J1-2, and the output is always high.  Below is a snippet of the code that sets up the GPIOs.  I have triple checked for pin assignment conflicts and can find none in the software.  If I step through the while look at the bottom, the pin output never toggles. it just remains high.  Any ideas?  I feel like I'm missing something obvious, but I just can't get it working and I've spent way more time on it than I had hoped.

Thanks!

void GpioInit(void) {
    // Enable the following GPIO pins:
    //   PE1 - Used for timer testing of the 4kHz loop.  No tactical function.
    //   PD6 - Use for controlling the *CS line on the AZ ADC.
    //   PC7 - Use for controlling the *CS line on the EL ADC.
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);  // Enable GPIO A
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);  // Enable GPIO B
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);  // Enable GPIO C
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);  // Enable GPIO D
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);  // Enable GPIO E
    SysCtlDelay(500);
    ROM_GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, GPIO_PIN_3 ); // Configure PA3 as a GPIO output.
    ROM_GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE, GPIO_PIN_5); // Configure PB5 as a GPIO output.
    ROM_GPIOPinTypeGPIOOutput(GPIO_PORTC_BASE, GPIO_PIN_7 ); // Configure PC7 as a GPIO output.
    ROM_GPIOPinTypeGPIOOutput(GPIO_PORTD_BASE, GPIO_PIN_6 ); // Configure PD6 as a GPIO output.
    ROM_GPIOPinTypeGPIOOutput(GPIO_PORTE_BASE, GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5); // Configure PE1/PE4/PE5 as a GPIO output.
    ROM_GPIOPinTypeGPIOInput(GPIO_PORTD_BASE, GPIO_PIN_1);
    ROM_GPIOPinTypeGPIOInput(GPIO_PORTD_BASE, GPIO_PIN_2);
    ROM_SysCtlDelay(500);  // Delay for a few clock ticks to allow the changes to apply before changing the state.
    // Initialize the ADC *CS pins HIGH output.  The *CS is active low.
    // Use direct register writes (DMA) for GPIO control to minimize latency.
    GPIO_PORTA_DATA_R |= GPIO_PIN_3;
    GPIO_PORTB_DATA_R |= GPIO_PIN_5;
    GPIO_PORTC_DATA_R |= GPIO_PIN_7;
    GPIO_PORTD_DATA_R |= GPIO_PIN_6;
    GPIO_PORTE_DATA_R |= GPIO_PIN_4;
    GPIO_PORTE_DATA_R |= GPIO_PIN_5;
    GPIO_PORTE_DATA_R &= ~GPIO_PIN_1;
while (1) {
   GPIO_PORTB_DATA_R &= ~GPIO_PIN_5;
   GPIO_PORTB_DATA_R |= GPIO_PIN_5;
}
}