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.

am335x set a gpio in high impedence mode

Dear all,

I need to drive a pin to reset a system attached to the am335x.

Unfortunatly I'm not the only one that can reset that system, so when I'm not driving I need to put that gpio in high impedence mode.

How can I do that trough the file system?

Thanks

  • Hi,

    Check section 9.3.1.51 conf_<module>_<pin> Register (offset = 800h–A34h) of the TRM. Bit 3 of the register enables/disables the pullup/pulldown pad resistor.

    Best regards,
    Miroslav

  • Many of the AM335x terminals default to GPIO mode after power is applied.  See the description of bits [2:0] of the respective conf_<module>_<pin> register.

    The GPIOs default to input mode after reset, but may have internal pull-up or pull-downs enabled while reset is applied and these pull-up or pull-down resistors may remain enabled after reset is released.

    I assume the reset signal you need connected to one of the AM335x GPIOs is active-low open-drain with an external pull-up and/or a few internal pull-ups in the attached devices.  If so, you should select one of the available AM335x GPIOs that has the internal pull-up enabled by default rather than one with a pull-down enable by default.  You do not want a pull-down in AM335x to be fighting the other pull-ups connected to this signal.

    You can configure the AM335x GPIO to operate like a open-drain output by permanently setting the respective bit in the GPIO_DATAOUT register low (0) and using the respective bit in the GPIO_OE register to toggle between output disabled (1) and output enabled (0).  However, you need to make sure your software never configures the respective bit of  GPIO_DATAOUT register high (1) while the respective bit in the GPIO_OE register is enabled (0) and another device is driving the signal low.

    Regards,
    Paul