Electrical – I2C Multiple Masters

i2c

I am working on Ti's EK-TM4C1294XL which is basically a Arm Cortex M4 evaluation board. I was going through I2C bus of the same and have the following question regarding the I2C bus.

I understand I2C support multi master multi slave configuration. So when we want to send data from a particular master to a particular slave we write first the slave address on the bus from that master and after receiving the Ack transmits the data to that slave.

So in the same situation i want to receive data from a particular slave to a particular master but can the slave start the communication? Like suppose slave is a ADC and once the conversion is done send the converted data to a particular master. Is this possible in I2C?

Best Answer

So in the same situation i want to receive data from a particular slave to a particular master but can the slave start the communication? Like suppose slave is a ADC and once the conversion is done send the converted data to a particular master. Is this possible in I2C?

A device which is a pure I2C slave can not start an I2C transaction. This holds for both multi- and single-master I2C buses.

However, some slave devices can alert the master out of band, not through I2C. When the master sees the alert, it will initiate the transaction. For this purpose, some ADCs have discrete digital outputs which correspond to the state of the A/D conversion. (For example, the AD7998 has got an ALERT/BUSY pin and an I2C connection for readout and configuration.)

If there is a multi-master bus, then a device could switch its role on the fly from master to slave. Then it can initiate an I2C transaction as a master. It would have to be a microcontroller with its own firmware. The vast majority of hard I2C devices are bus slaves, although there are a handful of hard I2C devices that are bus masters. I've never heard of a hard I2C device that would switch from master to slave.

By the way, here's a related thread: https://electronics.stackexchange.com/a/232135 .