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.

TM4C1294NCPDT: TivaWare - How do you set a GPIO output high before configuring it as an output?

Part Number: TM4C1294NCPDT

Hi, I'm using TivaWare to control a TM4C1294NCPDT and I want to make a GPIO high by default so that when it is first configured as an output it automatically goes to a high state. However, when I set the GPIO output before configuring the GPIO as an output it always starts at a low state. Any advice on how this can be done? This seems like fairly standard procedure with most microcontrollers.

Thanks,
Doug Burrell

  • Hi Doug,
    Please note that after reset the GPIO pins are input mode by default. If you want to keep the pin in a known state while the pin is input mode you can enable the pullup configuration. Did you try to use GPIOPinWrite() to first set the output register high and as soon as you call GPIOPinTypeGPIOOutput() to configure the pin as an output pin the logic high state will take effect?
  • Hi Charles,

    Yes, that's exactly what I tried to do: first set the output high with GPIOPinWrite(), then call GPIOPinTypeGPIOOutput(). I also found this thread that seems to be what I'm looking for: e2e.ti.com/.../506945.

    Thanks,
    Doug Burrell