0

I would like to hear if someone has successfully implemented a working connectable/disconnectable I2C interface. I'm working with the back plane (host device) and am looking into implementing a I2C buffer/switch to be able to connect and disconnect a single I2C sensor without hanging the buss. The sensor is the only I2C device on the bus.

My starting point is following application report: https://www.ti.com/lit/an/scpa058/scpa058.pdf?ts=1655397886223&ref_url=https%253A%252F%252Fwww.google.com%252F#:~:text=1%20What%20is%20an%20I2C,to%20power%20down%20the%20backplane.

However, I have no possibility to alter connector to be staggered or to alter the sensor itself. So my current plan is to simply use TCA4311ADR together with a connection-detection pin.

Block schematic

Do you think the design can work reliably? Are there any reference designs availible?

  • One example of hotplug I2C with one master and one device is the DDC connection in computer monitors. Perhaps you can find example schematics? – bobflux Jun 17 '22 at 16:28
  • @bobflux The example schematics would be in the VESA DDC or E-DDC specfication. But the schematics are not important. If you unplug a cable in the middle of a transaction, the MCU still needs to cope with it. As VGA connector (generally) has no hotplug detection, the MCU must periodically check with a transaction if a monitor happens to be plugged in, and the MCU must deal with the fact that the cable can be plugged in right in the middle of a transaction to poll if communications can work. – Justme Jun 17 '22 at 18:17

1 Answers1

1

The buffer does nothing if you only have single card with single sensor on the bus and nothing else. If the unplugging happens during communication, it is the role of the MCU I2C code to handle the situation anyway. The fact that there is a connection detect pin may help but is not necessary, because you must handle non-working transactions anyway.

Justme
  • 127,425
  • 3
  • 97
  • 261
  • In my understanding the buffer allows for a more controlled connection. The MCU gets a "ready" signal and can start communicating in a controlled manner (TI speak of capacitive loading etc.). But, just as you point out I feel that disconnection is still a gray area. Do you believe that it is possible to implement a stable disconnection code for such scenario? – NoobPointerException Jun 19 '22 at 11:06
  • 1
    It depends what for you need a more controlled connection. If you have no other devices on bus, there is no ongoing communication that could get corrupted by hotplugging your board in. And of course it is possible to implement stable code. VGA, DVI and HDMI among others have hot pluggable I2C. – Justme Jun 19 '22 at 11:10