Configuring BeagleBone Black GPIO to Open Drain Output

36 views
Skip to first unread message

mraulsol

unread,
Aug 31, 2021, 5:54:53 AM8/31/21
to BeagleBone
Hi,

Is there a way for BBB GPIOs to be configured as Open Drain output? How?
If yes, which GPIOs have the open drain mode aside from the I2C pins? 

Thanks,

Bill Gatliff

unread,
Aug 31, 2021, 7:44:34 AM8/31/21
to mraulsol, BeagleBone
You can't directly. What you do instead is switch them between input and output modes, and use pull-up (or pull-down, I always forget which) resistors as needed. The in-built ones may be sufficient if you enable them, depends on what your external hardware looks like.

Not a flaw of Linux or the chip, it's just how the hardware works to accommodate push-pull as well.  Many embedded chips work this way.

Other parts can do true open-drain, but nothing in the Beagle family that I recall. The above is usually close enough, especially since the GPIO driver and hardware can switch between input and output modes in a single instruction cycle, i.e. atomically, and the driven state is preserved as well.

b.g.

--
You received this message because you are subscribed to the Google Groups "BeagleBone" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beaglebone+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beaglebone/e6bcdaf4-e3ea-474f-ac97-edd736fe7821n%40googlegroups.com.

mraulsol

unread,
Aug 31, 2021, 10:55:45 PM8/31/21
to BeagleBone
Thanks for this! I'm still learning about BeagleBone and I got used to this mode being readily available for most microcontroller GPIOs.

So, does this mean, I have to do the following:
Logic 0 - Output mode driven to low
Logic 1 - Input mode with pullups (external)

???

jonnymo

unread,
Aug 31, 2021, 11:24:05 PM8/31/21
to mraulsol, BeagleBone

Bill Gatliff

unread,
Aug 31, 2021, 11:41:38 PM8/31/21
to mraulsol, BeagleBone


On Tue, Aug 31, 2021, 10:55 PM 'mraulsol' via BeagleBone <beagl...@googlegroups.com> wrote:
So, does this mean, I have to do the following:
Logic 0 - Output mode driven to low
Logic 1 - Input mode with pullups (external)

???

Yes.
Reply all
Reply to author
Forward
0 new messages