37.4.3.2 Multi-Host Mode Bus Arbitration
When the bus is Idle, any host device may attempt to take control of the bus. Two or more host devices may issue a Start condition within the minimum hold time (THD:STA), which triggers a valid Start on the bus. The host devices must then compete using bus arbitration to determine who takes control of the bus and completes their transaction.
Bus arbitration takes place bit by bit, and it may be possible for two hosts who have identical messages to complete the entire transaction without either device losing arbitration.
Arbitration can be lost in any of the following states:
- Address transfer
- Data transfer
- Start condition
- Restart condition
- Acknowledge sequence
- Stop condition
If a collision occurs during the data transfer phase, the transmission is halted and both SCL and SDA are released by hardware. If a collision occurs during a Start, Restart, Acknowledge, or Stop, the operation is aborted and hardware releases SCL and SDA. If a collision occurs during the addressing phase, the host that wins arbitration may be attempting to address the losing host as a client. In this case, the host that lost arbitration must switch to its Client mode and check to see if an address matches.