This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

I2C dual master - one slave part

We have a project that requires us to have 2 master I2C buses that come from different sources to talk to 1 slave device.  I know normally this is not allowed by the I2C design.  What I am wondering is can we take the (2)  I2C masters, run each bus into a separate I2C switch (like the PCA9543) and then use one of the switched channels from each PCA9543 to connect to the single slave device.  To get around having 2 active buses at the same time, on one slave device, I would toggle the "IntX" line to make sure that only one of the I2C buses coming from the 2 PCA9543's were active at a time.  Is this a valid use of these parts. Or is there a better way to accomplish the basic goal of having (2)  I2C master buses talk to a single slave device.

I suppose one question is, once a -Intx is asserted on either of the channels of the PCA9543, what happens electrically to the corresponding SDAx SCLx ?  Do they go into a high impedance state??  I cannot find a good electrical description of the SDAx SCLx once a corresponding Intx has been asserted.

Thanks

Joe

  • Hi Joe,

    Thanks for the question. If your master supports multi-master configuration then it's possible that you may not even need the switches to isolate your i2c buses. However, if they do not support multi-master, then this configuration with the switches should work in this application.

    Thanks,

    Siby

  • Siby, thanks for your post, I actually had forgotten about the multi-master protocol,  so far in my various designs that have used I2C it was not a factor.

    In this design we have 2 Netburner 'CPU' modules each with an I2c which I believe is multi master.  These 2 CPU,s need to be able to communicate with 3 sensors that due to their restrictions only have one slave address.  Of the 3  sensors, one each of the 3 will be  only accessed by each of the Netburner CPU modules.

    The issue comes with the 3rd sensor that is shared. I will still need to use a switch to be able to discriminate between the sensors as their addresses are the same..  

    Will the multi master  protocol propagate through an I2C switch like the PCA9543?

    Joe

  • Hi Joe,

    Multi-master is dependent on the masters. The switch can allow for multi master to pass through, but this can only happen if the channel is already connected. Any masters that need to control the switch must be connected to the master side of the switch since the channels of the switch can be turned off, and in this situation, any devices on the slave channel will not be able to control the switch or communicate with anything not on its channel.

    Thanks,
    Siby
  • Thanks Siby, that clarifies what I was thinking.  I have not had a chance to sit down at a schematic editor yet, but I did make up a simple drawing and wanted to see if this is the concept you are thinking about. 

    Its a simple sketch and I did not put all of the pin labels and pull up resistors etc.  but it does get my thought across.

    Note: The Netburner Nano54415 does support multi-master I2C

    Our goal would be that either Netburner could,  when its "its turn",   be able to access pressure sensor 3, all pressure sensors have the same slave address and are not adjustable. Pressure sensor 1 will only be accessed by Netburner 1 and pressure sensor 2 will only be accessed by Netburner 2

    Does this look like it will work?

  • Hi Joe,

    This schematic clears up a lot. Thank you for providing this!

    If Netburner Nano54415 is able to support the multi-master I2C protocol, then there shouldn't be an issue with this configuration.

    Thanks,
    Siby
  • Siby thanks for all of your help, one last question,  what are the rules when electrically combining 2 multi-master buses??  Pull-ups etc.

    Joe

  • Hi Joe,

    Standard I2C pullups should be fine for multi-master application.

    Thanks,
    Siby