Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
435
/
631
b)
EV5, EV6, and EV9 events extend the low level of SCL until the corresponding software sequence ends.
c)
The EV7 software sequence shall be completed before the end of the current byte transmission.
d)
The software sequence of EV6_1 or EV7_1 shall be completed before the ACK pulse of the current transmission
byte.
Error conditions description
I2C errors mainly include bus error, acknowledge error, arbitration loss, overload\ underload error. These errors
may cause communication failure.
Acknowledge Failure (ACKFAIL)
The interface have a acknowledge bit is detected that does not match the expectation, it will occurs acknowledge fail
error, I2C_STS1.ACKFAIL bit is set. An interrupt occurs, when I2C_CTRL2.ERRINTEN bit is set to 1.
When transmitter receives a NACK, The communication must be reset: Device in slave mode, hardware release the
bus; Device in master mode, it must generate a stop condition from software.
Bus Error (BUSERR)
when address or data is transmissing,I2C interface receive external stop or start condition,it will happen a bus error,
I2C_STS1.BUSERR bit is set. An interrupt occurs, when I2C_CTRL2.ERRINTEN bit is set to 1.
I2C device as master, the hardware does not release bus, as the same time it done not affect the current status of
transfer, The current transfer will determined by software whether suspend.
I2C device as slave, when data is discarded in transmission and the bus releases by hardware, it will have two situation:
If an error start condition is detected, the slave device considers a restart condition and waits for an address or a stop
condition. If an error stop condition is detected, the slave device operates as a normal stop condition and the hardware
releases the bus.
Arbitration Lost (ARLOST)
The interface have arbitration lost is detected, hardware release the bus, it will occurs arbitration lost error,
I2C_STS1.ARLOST bit is set. An interrupt occurs, when I2C_CTRL2.ERRINTEN bit is set to 1.
I2C interface will go to slave mode automatically(I2C_STS2.MSMODE bit is cleared). When the I2C interface lost
the arbitration, in the same communication, it can not respond to its slave address, but it can respond when master
win the bus retransmits a start signal. Hardware release the bus.
Overrun/Underrun Error (OVERRUN)
In slave mode, disable clock extend prone to Overrun/Underrun Error:
When I2C interface is receiving data (I2C_STS1.RXDATNE=1, data have received in register), and I2C_DAT
register still have previous byte has not been read, it will occurs an overrun error. In this situation, the last received
data is discarded. And software should clear I2C_STS1.RXDATNE bit, transmitter retransmit last byte.
When I2C interface is sending data (I2C_STS1.TXDATE=1, new data have not sending to register), and I2C_DAT
register still empty, it will occurs an underrun error. In this situation, the previous byte in the I2C_DAT register is
sending repeatedly. And User make sure that in the event of an underrun error, the receiver discard repeatedly byte,