EasyManuals Logo
Home>ST>Microcontrollers>STM32F410

ST STM32F410 User Manual

ST STM32F410
771 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 #604 background imageLoading...
Page #604 background image
Inter-integrated circuit (I
2
C) interface RM0401
604/771 RM0401 Rev 3
For N >2 -byte reception, from N-2 data reception
Wait until BTF = 1 (data N-2 in DR, data N-1 in shift register, SCL stretched low until
data N-2 is read)
Set ACK low
Read data N-2
Wait until BTF = 1 (data N-1 in DR, data N in shift register, SCL stretched low until a
data N-1 is read)
Set STOP high
Read data N-1 and N
23.3.4 Error conditions
The following are the error conditions which may cause communication to fail.
Bus error (BERR)
This error occurs when the I
2
C interface detects an external Stop or Start condition during
an address or a data transfer. In this case:
the BERR bit is set and an interrupt is generated if the ITERREN bit is set
in Slave mode: data are discarded and the lines are released by hardware:
in case of a misplaced Start, the slave considers it is a restart and waits for an
address, or a Stop condition
in case of a misplaced Stop, the slave behaves like for a Stop condition and the
lines are released by hardware
In Master mode: the lines are not released and the state of the current transmission is
not affected. It is up to the software to abort or not the current transmission
Acknowledge failure (AF)
This error occurs when the interface detects a nonacknowledge 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 or repeated Start condition must be generated by software
Arbitration lost (ARLO)
This error occurs when the I
2
C 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 I
2
C Interface goes automatically back to slave mode (the MSL bit is cleared). When
the I
2
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 winning master.
lines are released by hardware

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

ST STM32F410 Specifications

General IconGeneral
BrandST
ModelSTM32F410
CategoryMicrocontrollers
LanguageEnglish

Related product manuals