I have a setup where RPi may join existing I2C -bus as master when powered on. Before taking over, it will first notify secondary master with "slave select" -line so that the bus becomes free for taking.

The RPi is hardwired to the bus. Problems is that its SDA/SCL -pins doesn't seem to be open as I expected when RPi is powered off. I thought it would be fair to expect this since this would also mean that RPi used as I2C slave would also block the whole bus if powered off. Doesn't sound very nice...honestly I think this can't be true and I've just screwed up something.

So what am I missing? Or do I have any other options than external switch controled by RPi's 3v3 between RPi and the bus?

EDIT: The board is Raspberry Pi Zero W 1.1 (BCM2835)

  • I don't know what "pins doesn't seem to be open" means. The Pi has 1.8kΩ SDA/SCL pullup on the board. The Pi firmware doesn't support slave mode. – Milliways Jan 18 at 0:08
  • 1
    There is an ESD proctection diode between each GPIO and Vdd (and one between each GPIO and GND, too). If Vdd is 0V, this protection diode becomes conducting as soon the external line is >0.6V. That's your problem. And yes, you need a bus coupler to get around that. – Janka Jan 18 at 0:15
  • @MIlliways I'm quite amateur in electronics but it makes sense that if there are pullups then the problem indeed is that without power they can't be...well.. pulled up. Not sure how that theory fits to Janka 's comment though. It seems that RPi has another pair of I2C -pins which according to schematics don't have pullups. Would those work? – Simo Erkinheimo Jan 18 at 7:41
  • No the other I²C interface is reserved (and used for internal functions). If the Pi (or indeed any device) is actually unpowered the state is undefined, but effectively Gnd through an undefined impedance unless connected to external circuitry. – Milliways Jan 18 at 8:40
  • @Milliways Reserved how? I found few topics that I2C-0 (pins 28/29) can be enabled with simple device tree param in config.txt. Schematics also show that there actually is pull for either high or low in every single gpio pin except for 28 and 29. For me this sounds somewhat promising but then again I'm no pro. – Simo Erkinheimo Jan 18 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.