MS51
Dec. 17, 2019
Page
274
of 316
Rev 1.01
M
S51
SE
RIES
TE
CHNICA
L REF
ERE
N
CE MA
NU
A
L
6.10.3 Miscellaneous States
There are two I2CnSTAT status codes that do not correspond to the 25 defined states, The first status
code F8H indicates that no relevant information is available during each transaction. Meanwhile, the
SI flag is 0 and no I
2
C interrupt is required. The other status code 00H means a bus error has
occurred during a transaction. A bus error is caused by a START or STOP condition appearing
temporally at an illegal position such as the second through eighth bits of an address or a data byte,
and the acknowledge bit. When a bus error occurs, the SI flag is set immediately. When a bus error is
detected on the I
2
C bus, the operating device immediately switches to the not addressed salve mode,
releases I2C0_SDA and I2C0_SCL lines, sets the SI flag, and loads I2CnSTAT as 00H. To recover
from a bus error, the STO bit should be set and then SI should be cleared. After that, STO is cleared
by hardware and release the I
2
C bus without issuing a real STOP condition waveform on I
2
C bus.
There is a special case if a START or a repeated START condition is not successfully generated for
I
2
C bus is obstructed by a low level on I2C0_SDA line e.g. a slave device out of bit synchronization,
the problem can be solved by transmitting additional clock pulses on the I2C0_SCL line. The I
2
C
hardware transmits additional clock pulses when the STA bit is set, but no START condition can be
generated because the I2C0_SDA line is pulled low. When the I2C0_SDA line is eventually released,
a normal START condition is transmitted, state 08H is entered, and the serial transaction continues. If
a repeated START condition is transmitted while I2C0_SDA is obstructed low, the I
2
C hardware also
performs the same action as above. In this case, state 08H is entered instead of 10H after a
successful START condition is transmitted. Note that the software is not involved in solving these bus
problems.
The following table is show the status display in I2STAT register of I
2
C number and description:
Master Mode
Slave Mode
STATUS
Description
STATUS
Description
0x08
Start
0xA0
Slave Transmit Repeat Start or Stop
0x10
Master Repeat Start
0xA8
Slave Transmit Address ACK
0x18
Master Transmit Address ACK
0xB0
Slave Transmit Arbitration Lost
0x20
Master Transmit Address NACK
0xB8
Slave Transmit Data ACK
0x28
Master Transmit Data ACK
0xC0
Slave Transmit Data NACK
0x30
Master Transmit Data NACK
0xC8
Slave Transmit Last Data ACK
0x38
Master Arbitration Lost
0x60
Slave Receive Address ACK
0x40
Master Receive Address ACK
0x68
Slave Receive Arbitration Lost
0x48
Master Receive Address NACK
0x80
Slave Receive Data ACK
0x50
Master Receive Data ACK
0x88
Slave Receive Data NACK
0x58
Master Receive Data NACK
0x70
GC mode Address ACK
0x00
Bus error
0x78
GC mode Arbitration Lost
0x90
GC mode Data ACK
0x98
GC mode Data NACK
0xF8
Bus Released
Note:
Status “0xF8” exists in both master/slave modes, and it won’t raise interrupt.
6.10.4
I
2
C Time-Out