14 I
2
C (I2C)
S1C17M20/M21/M22/M23/M24/M25
Seiko Epson Corporation
14-15
TECHNICAL MANUAL (Rev. 1.0)
Normal operations
STARTIF = 1
ERRIF = 1
STARTIF = 1
SDA
SCL
START
condition
START
condition
Slave a R/W
SDA check
1
2
n
When SDA = LOW is detected
SDA
SCL
Bus clearing operation
SDA check
(n
≤
9)
1
2
10
SDA
SCL
Figure 14.4.8.1 Automatic Bus Clearing Operation
14.4.9 Error Detection
The I2C includes a hardware error detection function.
Furthermore, the I2C
n
INTF.SDALOW and I2C
n
INTF.SCLLOW bits are provided to allow software to check whether
the SDA and SCL lines are fixed at low. If unintended low level is detected on SDA or SCL, a software recovery pro-
cessing, such as I2C Ch.
n
software reset, can be performed.
The table below lists the hardware error detection conditions and the notification method.
Table 14.4.9.1 Hardware Error Detection Function
No.
Error detecting period/timing
I
2
C bus line monitored and
error condition
Notification method
1 While the I2C Ch.n controls SDA to high for sending address,
data, or a NACK
SDA = low
I2CnINTF.ERRIF = 1
2 <Master mode only> When 1 is written to the I2CnCTL.TX-
START bit while the I2CnINTF.BSY bit = 0
SCL = low
I2CnINTF.ERRIF = 1
I2CnCTL.TXSTART = 0
I2CnINTF.STARTIF = 1
3 <Master mode only> When 1 is written to the I2CnCTL.TXS-
TOP bit while the I2CnINTF.BSY bit = 0
SCL = low
I2CnINTF.ERRIF = 1
I2CnCTL.TXSTOP = 0
I2CnINTF.STOPIF = 1
4 <Master mode only> When 1 is written to the I2CnCTL.TX-
START bit while the I2CnINTF.BSY bit = 0 (Refer to “Automatic
Bus Clearing Operation.”)
SDA
Automatic bus clearing
failure
I2CnINTF.ERRIF = 1
I2CnCTL.TXSTART = 0
I2CnINTF.STARTIF = 1