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.

Setting a GPIO pin as input in uboot

Hi,

How to set a GPIO pin as input in uboot ?


Thanks And Regards,

Mike

  • Mike,

    If you want to set the GPIO in u-boot, you can do this after pinmux and with direct programming of the GPIO registers. See also the below e2e thread:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/146704
    http://e2e.ti.com/support/embedded/linux/f/354/t/152492

    Regards,
    Pavel
  • Hi Pavel,

    All the links which you pointed set the GPIO pins as output, I need to set the GPIO pin as input. By default is the GPIO pin set as input ?

    Thanks & Regards,
    Mike
  • Hi Mike,

    Yes, all GPIO pins are set as input by default, see GPIO_OE register in TRM.

    "The GPIO_OE register is used to enable the pins output capabilities. At reset, all the GPIO related pins are configured as input and output capabilities are disabled."

    Which GPIO pin exactly you want to use? Make sure nothing overwrite its default value (which is input).

    BR
    Pavel