cleverca22
Posts: 844
Joined: Sat Aug 18, 2012 2:33 pm

gpio alt mode conflict

Fri May 15, 2020 9:48 pm

what happens if you set 2 gpio pins to conflicting alt modes?

for example, setting gpio0 to alt0(SDA0) but also setting gpio28 to alto(SDA0)

would the internal buffers within the mux array begin to fight eachother, or is there some safety to prevent damage in such a situation?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 9069
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: gpio alt mode conflict

Sat May 16, 2020 2:11 pm

cleverca22 wrote:
Fri May 15, 2020 9:48 pm
what happens if you set 2 gpio pins to conflicting alt modes?

for example, setting gpio0 to alt0(SDA0) but also setting gpio28 to alto(SDA0)

would the internal buffers within the mux array begin to fight eachother, or is there some safety to prevent damage in such a situation?
Generally you end up with nothing.
I don't know the exact internal logic, but I suspect it's an or on the input path, so with I2C pullups it always sees a 1, and therefore no ACKs.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

cleverca22
Posts: 844
Joined: Sat Aug 18, 2012 2:33 pm

Re: gpio alt mode conflict

Sat May 16, 2020 5:07 pm

ah, and that kind of feels like it makes the most sense, design-wise

the mux is just a giant matrix of tri-state buffers, and then a big OR gate to combine them all, with an internal (weak) pulldown maybe after each tristate

sounds like its probably safe to cause a conflict on purpose and confirm things exactly

Return to “Advanced users”