ST STM32F412 Reference Manual page 733

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

RM0402
Master receiver
Following the address transmission and after clearing ADDR, the I
Master Receiver mode. In this mode the interface receives bytes from the SDA line into the
DR register via the internal shift register. After each byte the interface generates in
sequence:
1.
An acknowledge pulse if the ACK bit is set
2.
The RxNE bit is set and an interrupt is generated if the ITEVFEN and ITBUFEN bits are
set (see
If the RxNE bit is set and the data in the DR register is not read before the end of the last
data reception, the BTF bit is set by hardware and the interface waits until BTF is cleared by
a read in the DR register, stretching SCL low.
Closing the communication
The master sends a NACK for the last byte received from the slave. After receiving this
NACK, the slave releases the control of the SCL and SDA lines. Then the master can send
a Stop/Restart condition.
1.
To generate the nonacknowledge pulse after the last received data byte, the ACK bit
must be cleared just after reading the second last data byte (after second last RxNE
event).
2.
In order to generate the Stop/Restart condition, software must set the STOP/START bit
after reading the second last data byte (after the second last RxNE event).
3.
In case a single byte has to be received, the Acknowledge disable is made during EV6
(before ADDR flag is cleared) and the STOP condition generation is made after EV6.
After the Stop condition generation, the interface goes automatically back to slave mode
(MSL bit cleared).
Figure 243
Transfer sequencing EV7).
RM0402 Rev 6
Inter-integrated circuit (I
2
C interface enters
2
C) interface
733/1163
757

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Table of Contents

Save PDF