
NUC126
Aug. 08, 2018
Page
821
of 943
Rev 1.03
NUC12
6 S
E
RI
E
S
T
E
CH
NI
CA
L R
E
F
E
RE
NCE
MA
NUA
L
and SPCLKSEL = 2’b00 (f
SAMP_CLK
= f
DIV_CLK
). Under these conditions, the baud rate is given by:
In order to generate slower frequencies, additional divide-by-2 stages can be selected by PTCLKSEL
= 1 (f
PROT_CLK
= f
REF_CLK2
), leading to:
If SPCLKSEL = 2’b10 (f
SAMP_CLK
= f
SCLK
), and RCLKSEL = 0 (f
REF_CLK
= f
PCLK
), PTCLKSEL = 0 (f
PROT_CLK
= f
REF_CLK
). The baud rate is given by:
6.22.5.6 Byte Stretching
If a device is selected as transceiver and should transmit a data byte but the transmit buffer TXDAT
does not contain valid data to be transmitted, the device ties down SCL = 0 at the end of the previous
acknowledge bit. The waiting period is finished if software writes 1 to PTRG (UI2C_PROTCTL [5]).
6.22.5.7 Master Arbitration
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 two masters sometimes initiate I
2
C 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. Master I
2
C 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 I
2
C master must monitor the I
2
C
bus for collisions and act accordingly. Figure 6.22-7 describe DATA1 and DATA2 are compete
arbitration.
Master 1 loses arbitration
DATA 1
≠
SDA
DATA1
DATA2
SDA
SCL
Figure 6.22-7 Arbitration Lost
In this case, during the address and data transmission, the master transmitter checks at the rising
edge of SCL for each data bit if the value it is sending is equal to the value read on the SDA line. If
yes, the next data bit values can be 0. If this is not the case (transmitted value = 1, value read = 0), the