29. I2C Bus Interface (RIIC)
29.9.2
Function to Detect Loss of Arbitration during NACK Transmission (NALE Bit)
The RIIC has a function to cause arbitration to be lost if the internal SDA output level does not match the level on the
SDA0 line (the 1 output as the internal SDA output; i.e. the SDA0 pin is in the high-impedance state) and the low level is
detected on the SDA line during transmission of NACK in receive mode. Arbitration is lost due to a conflict of NACK
transmission and ACK transmission when two or more master devices receive data from the same slave device
simultaneously in a multi-master system. Such conflict occurs when multiple master devices send/receive the same
information through a single slave device.
Figure 29.34 shows an example of arbitration-lost detection during
transmission of NACK.
Figure 29.34
Example of Arbitration-Lost Detection during Transmission of NACK (NALE = 1)
The following explains arbitration-lost detection using an example where two master devices (master A and master B)
and a single slave device are connected through the bus. In this example, master A receives two bytes of data from the
slave device, and master B receives four bytes of data from the slave device.
If master A and master B access the slave device simultaneously, because the slave address is identical, arbitration is not
lost in both master A and master B during access to the slave device. Therefore, both master A and master B recognize
that they have obtained the bus mastership and operate as such. Here, master A sends NACK when it has received two
final bytes of data from the slave device. Meanwhile, master B sends ACK because it has not received necessary four
bytes of data. At this time, the NACK transmission from master A and the ACK transmission from master B conflict. In
general, if a conflict like this occurs, master A cannot detect ACK transmitted by master B and issues a stop condition.
Therefore, the issuance of the stop condition conflicts with the SCL clock output of master B, which disturbs
communication.
When the RIIC receives ACK during transmission of NACK, it detects a defeat in conflict with other master devices and
causes arbitration to be lost.
If arbitration is lost during transmission of NACK, the RIIC immediately cancels the slave match condition and enters
slave receive mode. This prevents a stop condition from being issued, preventing a communication failure on the bus.
Similarly, in the ARP command processing of SMBus, the function to detect loss of arbitration during transmission of
NACK is also available for eliminating the extra clock cycle processing (such as FFh transmission processing) necessary
if the UDID (Unique Device Identifier) of assign address dose not match in the Get UDID (general) processing after the
Assign address command.
The RIIC detects arbitration-lost during transmission of NACK when the following condition is met with the NALE bit
in ICFER set to 1 (arbitration-lost detection during NACK transmission enabled).
8
2
3
45
67
Data
8
23
4
5
6
Data
8
2
3
45
67
Data
2
3
45
67
Data
9
1
9
23
4
5
Data
Read ICDRR
Write 1 to ACKBT
Clear AL to 0
NACK transmission mismatch
(Arbitration lost)
Release SCL0/SDA0
TRS
AL
MST
BBSY
RDRFS
SCL0
SDA0
SCL0
SDA0
RDRF
ACKBT
[Conflict during transmission of NACK (ACK received)]
ACK
NACK
ACK
Write 1 to RDRFS
Read ICDRR
7
8
Receive data