1
0
0
0
1
0
0
0
1
1
1
1
1
0
Device #1 lost arbitration
and switches off
Bus line
I2Cx_SCL
Data from
device #1
Data from
device #2
Bus line
I2Cx_SDA
Functional Description
21.3.7 Arbitration
If two or more master transmitters start a transmission on the same bus almost simultaneously, an
arbitration procedure is invoked. The arbitration procedure uses the data presented on the serial bus by
the competing transmitters. When a transmitter senses that a high signal it has presented on the bus has
been overruled by a low signal, it switches to the slave receiver mode, sets the arbitration lost (AL) flag,
and generates the arbitration lost interrupt.
shows the arbitration procedure between two
devices. The arbitration procedure gives priority to the device that transmits the serial data stream with the
lowest binary value. Should two or more devices send identical first bytes, arbitration continues on the
subsequent bytes.
Figure 21-9. Arbitration Procedure Between Two Master Transmitters
21.3.8 I2C Clock Generation and I2C Clock Synchronization
Under normal conditions, only one master device generates the clock signal, SCL. During the arbitration
procedure, however, there are two or more master devices and the clock must be synchronized so that
the data output can be compared. The wired-AND property of the clock line means that a device that first
generates a low period of the clock line overrules the other devices. At this high/low transition, the clock
generators of the other devices are forced to start generation of their own low period. The clock line is
then held low by the device with the longest low period, while the other devices that finish their low periods
must wait for the clock line to be released before starting their high periods. A synchronized signal on the
clock line is thus obtained, where the slowest device determines the length of the low period and the
fastest the length of the high period.
If a device pulls down the clock line for a longer time, the result is that all clock generators must enter the
WAIT-state. In this way a slave can slow down a fast master and the slow device can create enough time
to store a received byte or to prepare a byte to be transmitted (Clock Stretching).
illustrates
the clock synchronization.
Note: If the SCL or SDA lines are stuck low, the Bus Clear operation is supported. If the clock line (SCL)
is stuck low, the preferred procedure is to reset the bus using the hardware reset signal if your I2C
devices have hardware reset inputs. If the I2C devices do not have hardware reset inputs, cycle power to
the devices to activate the mandatory internal power-on reset (POR) circuit. If the data line (SDA) is stuck
low, the master should send nine clock pulses. The device that held the bus low should release it
sometime within those nine clocks. If not, use the hardware reset or cycle power to clear the bus.
3707
SPRUH73H – October 2011 – Revised April 2013
I2C
Copyright © 2011–2013, Texas Instruments Incorporated