I am fine with I2C basic communication and implementation? Need info on Multimaster mode of I2C How does multi master I2C work? Advantages over I2C single Master? In what circumstances this multi master is preferred? Is it possible that a single slave can have multiple masters?
I2C Master is decided by who owns the bus meaning who provides the clock, in the give figure below you can see that 2 i2c masters try to access the slave device for information. Typical lythe slave could be an eeprom.
When Master1 needs the bus it polls the bus whether it is free or not (if the line is low than the I2C bus is taken by someone) if the line is high it pulls down and sends across the address (7 bit and 8 bit being R/W) each of the I2C device connected to the bus samples the same and responds with an ack if it is being addressed by pulling it low. once after the required communication the master releases the bus. An App note from renesas Microcontroller explaining multi master mode I2C
That basically depends on the application, In our application we use INA219 CSM in Power Module for monitoring the power consumed, The Soc Device at regular interval polls the csm to observe the power consumed. Also we have TPS Switching Regulator whose output can be varied via I2c interface(FTDI I2C Master
In what circumstances this multi master is preferred?
Well thats easy to answer, mission critical applications, such as if one microcontroller fails the other microcontroller will take over. This is going to be heavily coding based.
One cool reason to use multi master is that you have more flexibility in your projects. You can call functions VIA the I2C bus for a particular micro controller and that micro controller can also call functions back or to other devices in the I2C bus.