DocID018909 Rev 11
835/1731
RM0090
Inter-integrated circuit (I
2
C) interface
864
Figure 241. Transfer sequence diagram for slave transmitter
1. The EV1 and EV3_1 events stretch SCL low until the end of the corresponding software sequence.
2. The EV3 event stretches SCL low if the software sequence is not completed before the end of the next byte
transmission
Slave receiver
Following the address reception and after clearing ADDR, the slave 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 by hardware and an interrupt is generated if the ITEVFEN and
ITBUFEN bit is set.
If RxNE is set and the data in the DR register is not read before the end of the next data
reception, the BTF bit is set and the interface waits until BTF is cleared by a read from the
I2C_DR register, stretching SCL low (see
Transfer sequencing).
7-bit slave transmitter
10-bit slave transmitter
Legend:
S
=
S
t
a
rt,
S
r
= Repe
a
ted
S
t
a
rt, P=
S
top, A= Acknowledge, NA= Non-
a
cknowledge,
EVx= Event (with interr
u
pt if ITEVFEN=1)
EV1:
ADDR=1, cle
a
red by re
a
ding
S
R1 followed by re
a
ding
S
R2
EV3-1:
TxE=1,
s
hift regi
s
ter empty, d
a
t
a
regi
s
ter empty, write D
a
t
a
1 in DR.
EV3:
TxE=1,
s
hift regi
s
ter not empty, d
a
t
a
regi
s
ter empty, cle
a
red by writing DR
EV3-2:
AF=1; AF i
s
cle
a
red by writing ‘0’ in AF bit of
S
R1 regi
s
ter.
S
Addre
ss
A
D
a
t
a
1
A
D
a
t
a
2
A
.....
D
a
t
a
N
NA
P
EV1 EV
3
-1 EV
3
EV
3
EV
3
EV
3
-2
S
He
a
der
A
Addre
ss
A
EV1
S
r
He
a
der
A
D
a
t
a
1
A
.... D
a
t
a
N
NA P
EV1 EV
3
_1
EV
3
EV
3
EV
3
-2
a
i1
8
209