Optional/Switchable pull-up resistors for I2C driven by single GPIO

Status
Not open for further replies.

bootsector

Member
Hi there!

I'm planning to add an optional pair of pull-up resistors for I2C communication (PB10 and PB11) driven by a GPIO (PB7) from a micro-controller:

fdkjCYM.png


The idea is to keep PB7 in input-floating mode until I'm about to use PB10 and PB11 for I2C. In that case, PB7 will be put in output-high mode, activating the pull-ups.

My question is: would leaving PB7 in input-floating mode really make like the pull-ups weren't part of the circuit? PB10 and PB11 will be re-purposed for other type of communication that doesn't require pull-ups, so I don't want them interfering with the circuit in that case.

What do you guys think?

Cheers!

PS: PB7 is the only GPIO pin I have left, there's no other available.
 
My question is micro-controller agnostic, but let's say I wanted to apply this solution to a Teensy 3.1. Would that work?
 
Names like PB7, PB10, PB11 kinda sound like some other board than Teensy 3.1...

I would choose p-channel mosfets rather than schottky diodes. The diodes might work, or might cause trouble due to their substantial leakage and capacitive coupling. Might depend on how sensitive the other non-I2C signals are, and whether they have very fast rising & falling edges. On Teensy 3.1 the pins are normally used with slew rate control... but then, from the names you're using, I'm guessing you're not actually using a Teensy 3.1, are you?
 
Thanks, Paul!

I'm actually prototyping on a STM32F103 based board, but not being able to use internal pull-ups (even though they are weak, they would be enough for my application) bothers me.

Those lines will be also used for protocols (non-I2C) that might reach up to 1Mhz. So I think a Mosfet would be better than the Schottky, I suppose?
 
Status
Not open for further replies.
Back
Top