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.

GPIO's / Open collector



Hi,

I would like to get an open collector behavior of a gpio pin without the need for an external transistor.

Normally you'd just set it as an output with logic 0 vs. an floating/high-impedance input.

Just want to confirm if this is true:
When controlling an external input that might be pulled-up to something exceeding the CPU's bank supply voltage, the internal protection diode in the cpu will prevent it from ever going above the supply + diode drop.

Any other tricks to achieve this with the Sitara gpio's?

Thankd Dav

  • Hi Dav,
     
    The AM335X Datasheet has all the information on processor I/O cells. Please keep in mind that none of them are high-voltage tolerant, except USBx_VBUS pins. I/O pins must never be pulled-up above the I/O cell supply voltage.
  • Thanks Biser,

    Got it. I was thinking if there was a way to use internal mux-functions to achieve the function of a open collector.


    Best Dav

  • You can configure a GPIO to operate as open-drain. 

    Configure the IO to operate in GPIO mode (set the respective conf_<module>_<pin>[2:0] register bits to 111b to select pin multiplexing mode 7 which is GPIO mode, default for most GPIOs). Then reset the the respective GPIO_DATAOUT bit which will configure the output to be low when the output is enabled.  Then use the respective GPIO_OE bit to control the output buffer enable.  When the respective GPIO_OE bit is set high the output will be disabled which causes the IO to be high impedance, and when reset low the output will be enabled and driven low.

    As Biser mentioned, the GPIOs are not fail-safe so you should never apply a voltage greater that the respective VDDSHVx + 0.3 volts.

    Regards,
    Paul