ISD94100 Series Technical Reference Manual
Sep 9, 2019
Page
636
of 928
Rev1.09
IS
D
9
410
0
S
ER
IE
S
T
E
C
HN
ICA
L
RE
F
E
RE
NCE
M
AN
U
AL
6.13.5.2.5
Multi-Master
In some applications, there are two or more masters on the same I
2
C bus to access slaves, and the
masters may transmit data simultaneously. The I
2
C supports multi-master by including collision
detection and arbitration to prevent data corruption.
If for some reason two masters initiate command at the same time, the arbitration procedure
determines which master wins and can continue with the command. Arbitration is performed on the
SDA signal while the SCL signal is high. Each master checks if the SDA signal on the bus
corresponds to the generated SDA signal. If the SDA signal on the bus is low but it should be high,
then this master has lost arbitration. The device that has lost arbitration can generate SCL pulses
until the byte ends and must then release the bus and go into slave mode. The arbitration procedure
can continue until all the data is transferred. This means that in multi-master system each master
must monitor the bus for collisions and act accordingly.
DATA 1
DATA 2
SDA
SCL
S
master 1 loses arbitration
DATA1 != SDA
Arbitration procedure of two masters
Figure 6.13-17 Arbitration Lost
When I2C_STATUS = 0x38, an “Arbitration Lost” is received. Arbitration lost event maybe
occur during the send START bit, data bits or STOP bit. User could set (STA, STO, SI,
AA) = (1, 0, 1, X) to send START again when bus free, or set (STA, STO, SI, AA) = (0, 0,
1, X) to not addressed Slave mode. User can detect bus free by ONBUSY (I2C_STATUS1
[8]).
When I2C_STATUS = 0x00, a “Bus Error” is received. To recover I
2
C bus from a bus error,
STO should be set and SI should be cleared, and then STO is cleared to release bus.
-
Set (STA, STO, SI, AA) = (0, 1, 1, X) to stop current transfer
-
Set (STA, STO, SI, AA) = (0, 0, 1, X) to release bus