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.

Failed to read/write GPIO lines in TM4C129X based board

We are trying to read/write some GPIO lines on TIVA C series TM4C129X based custom board. But gpio line is not getting written.

The below code fragment is used to write to the GPIO line (gpio port B, line 6):

SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);

GPIOPinConfigure(GPIO_PB2_T5CCP0);

GPIOPinTypePWM(GPIO_PORTB_BASE, GPIO_PIN_2);

GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE, 2);

GPIOPinWrite(GPIO_PORTB_BASE, 2, 0x1);

Checked with the oscilloscoe, and the gpio line is still shown as low.

Can anyone provide some pointer to the example code for toggling any gpio line in TI RTOS on TIVA C series ?

  • Hi Prashanth,

    There are GPIO examples in TI-RTOS. There is a GPIO Interrupt example that you can look at. Note: TI-RTOS GPIO driver is built on top of the driverlib calls you listed.

    There is blinky example in TivaWare if you just want to see a non-RTOS example.

    Todd