26.3.3.2 Multi-Host

A host can start a bus transaction only if it has detected that the bus is in the Idle state. As the TWI bus is a multi-host bus, more devices may try to initiate a transaction at the same time. This results in multiple hosts owning the bus simultaneously. The TWI solves this problem by using an arbitration scheme where the host loses control of the bus if it is not able to transmit a high-level data bit on the SDA and the Bus State (BUSSTATE) bit field from the Host Status (TWIn.MSTATUS) register will be changed to Busy. The hosts that lose the arbitration must wait until the bus becomes Idle before attempting to reacquire the bus ownership.

Both devices can issue a Start condition, but DEVICE1 loses arbitration when attempting to transmit a high-level (bit 5) while DEVICE2 is transmitting a low-level.

Figure 26-7. TWI Arbitration