16 I
2
C (I2C)
16-16
Seiko Epson Corporation
S1C31D50/D51 TECHNICAL MANUAL
(Rev. 2.00)
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 16.4.8.1 Automatic Bus Clearing Operation
16.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 wheth-
er the SDA and SCL lines are fixed at low. If unintended low level is detected on SDA or SCL, a software recovery
processing, such as I2C Ch.
n
software reset, can be performed.
The table below lists the hardware error detection conditions and the notification method.
Table 16.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
I2C_nINTF.ERRIF = 1
2 <Master mode only> When 1 is written to the I2C_nCTL.TX-
START bit while the I2C_nINTF.BSY bit = 0
SCL = low
I2C_nINTF.ERRIF = 1
I2C_nCTL.TXSTART = 0
I2C_nINTF.STARTIF = 1
3 <Master mode only> When 1 is written to the I2C_nCTL.TX-
STOP bit while the I2C_nINTF.BSY bit = 0
SCL = low
I2C_nINTF.ERRIF = 1
I2C_nCTL.TXSTOP = 0
I2C_nINTF.STOPIF = 1
4 <Master mode only> When 1 is written to the I2C_nCTL.
TXSTART bit while the I2C_nINTF.BSY bit = 0 (Refer to “Au-
tomatic Bus Clearing Operation.”)
SDA
Automatic bus clearing
failure
I2C_nINTF.ERRIF = 1
I2C_nCTL.TXSTART = 0
I2C_nINTF.STARTIF = 1