
Inter-integrated circuit (I 2 C) interface
RM0008
Closing the communication
After writing the last byte to the DR register, the STOP bit is set by software to generate a
Stop condition (see Figure 235 Transfer sequencing EV8_2). The interface goes
automatically back to slave mode (M/SL bit cleared).
Note:
Stop condition should be programmed during EV8_2 event, when either TxE or BTF is set.
Figure 235. Transfer sequence diagram for master transmitter
Master receiver
Following the address transmission and after clearing ADDR, the I 2 C interface enters
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:
●
●
An acknowledge pulse if the ACK bit is set
The RxNE bit is set and an interrupt is generated if the ITEVFEN and ITBUFEN bits are
set (see Figure 236 Transfer sequencing EV7).
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 SR1 register followed by a read in the DR register, stretching SCL low.
632/995
Doc ID 13902 Rev 9