Wait
State
Start HIGH
Period
SCL From
Device 1
SCL From
Device 2
Bus Line
SCL
eUSCI_B Operation – I
2
C Mode
837
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
Enhanced Universal Serial Communication Interface (eUSCI) – I
2
C Mode
32.3.6 Glitch Filtering
According to the I
2
C standard, both the SDA and the SCL line need to be glitch filtered. The eUSCI_B
module provides the UCGLITx bits to configure the length of this glitch filter:
Table 32-1. Glitch Filter Length Selection Bits
UCGLITx
Corresponding Glitch Filter Length on SDA and SCL
According to I
2
C
Standard
00
Pulses of max 50-ns length are filtered
yes
01
Pulses of max 25-ns length are filtered.
no
10
Pulses of max 12.5-ns length are filtered.
no
11
Pulses of max 6.25-ns length are filtered.
no
32.3.7 I
2
C Clock Generation and Synchronization
The I
2
C clock SCL is provided by the master on the I
2
C bus. When the eUSCI_B is in master mode,
BITCLK is provided by the eUSCI_B bit clock generator and the clock source is selected with the
UCSSELx bits. In slave mode, the bit clock generator is not used and the UCSSELx bits are don't care.
The 16-bit value of UCBRx in register UCBxBRW is the division factor of the eUSCI_B clock source,
BRCLK. The maximum bit clock that can be used in single master mode is f
BRCLK
/4. In multi-master mode,
the maximum bit clock is f
BRCLK
/8. The BITCLK frequency is given by:
f
BitClock
= f
BRCLK
/UCBRx
The minimum high and low periods of the generated SCL are:
t
LOW,MIN
= t
HIGH,MIN
= (UCBRx/2)/f
BRCLK
when UCBRx is even
t
LOW,MIN
= t
HIGH,MIN
= ((UCBRx – 1)/2)/f
BRCLK
when UCBRx is odd
The eUSCI_B clock source frequency and the prescaler setting UCBRx must to be chosen such that the
minimum low and high period times of the I
2
C specification are met.
During the arbitration procedure the clocks from the different masters must be synchronized. A device that
first generates a low period on SCL overrules the other devices, forcing them to start their own low
periods. SCL is then held low by the device with the longest low period. The other devices must wait for
SCL to be released before starting their high periods.
shows the clock synchronization. This
allows a slow slave to slow down a fast master.
Figure 32-16. Synchronization of Two I
2
C Clock Generators During Arbitration
32.3.7.1 Clock Stretching
The eUSCI_B module supports clock stretching and also makes use of this feature as described in the
Operation Mode sections.
The UCSCLLOW bit can be used to observe if another device pulls SCL low while the eUSCI_B module
already released SCL due to the following conditions:
•
eUSCI_B is acting as master and a connected slave drives SCL low.