EasyManuals Logo

ST STM8S Reference Manual

ST STM8S
449 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #290 background imageLoading...
Page #290 background image
Inter-integrated circuit (I
2
C) interface RM0016
290/449 Doc ID 14587 Rev 8
Bus error (BERR)
This error occurs when the I2C interface detects an external stop or a start condition during
an address or data transfer. In this case:
The BERR bit is set and an interrupt is generated if the ITERREN bit is set
In the case of the slave: data are discarded and the lines are released by hardware:
In the case of a misplaced start, the slave considers it is a restart and waits for an
address or a stop condition.
In the case of a misplaced stop, the slave reacts in the same way as for a stop
condition and the lines are released by hardware.
In the case of the master: the lines are not released and there is no effect in the state of
the current transmission: software can decide if it wants to abort the current
transmission or not.
Acknowledge failure (AF)
This error occurs when the interface detects a non-acknowledge bit. In this case,
The AF bit is set and an interrupt is generated if the ITERREN bit is set
A transmitter which receives a NACK must reset the communication:
If slave: Lines are released by hardware
If master: A stop condition or repeated start must be generated by software
Arbitration lost (ARLO)
This error occurs when the I2C interface detects an arbitration lost condition. In this case,
The ARLO bit is set by hardware (and an interrupt is generated if the ITERREN bit is
set).
The I2C interface goes automatically back to slave mode (the MSL bit is cleared)
When the I²C loses the arbitration, it is not able to acknowledge its slave address in the
same transfer, but it can acknowledge it after a repeated start from the master.
Lines are released by hardware
Overrun/underrun error (OVR)
An Overrun error can occur in slave mode when clock stretching is disabled and the I2C
interface is receiving data. The interface has received a byte (RXNE = 1) and the data in DR
has not been read, before the next byte is received by the interface. In this case,
The last received byte is lost
In case of overrun error, software should clear the RXNE bit and the transmitter should
re-transmit the last received byte.

Table of Contents

Other manuals for ST STM8S

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM8S and is the answer not in the manual?

ST STM8S Specifications

General IconGeneral
BrandST
ModelSTM8S
CategoryMicrocontrollers
LanguageEnglish

Related product manuals