
RM0008
Inter-integrated circuit (I
2
C) interface
Doc ID 13902 Rev 12
729/1096
Figure 269. I
2
C block diagram
1.
SMBA is an optional signal in SMBus mode. This signal is not applicable if SMBus is disabled.
26.3.2 I
2
C slave mode
By default the I
2
C interface operates in Slave mode. To switch from default Slave mode to
Master mode a Start condition generation is needed.
The peripheral input clock must be programmed in the I2C_CR2 register in order to
generate correct timings. The peripheral input clock frequency must be at least:
●
2 MHz in Standard mode
●
4 MHz in Fast mode
As soon as a start condition is detected, the address is received from the SDA line and sent
to the shift register. Then it is compared with the address of the interface (OAR1) and with
OAR2 (if ENDUAL=1) or the General Call address (if ENGC = 1).
Note:
In 10-bit addressing mode, the comparison includes the header sequence (11110xx0),
where xx denotes the two most significant bits of the address.
Header or address not matched
: the interface ignores it and waits for another Start
condition.
Header matched
(10-bit mode only): the interface generates an acknowledge pulse if the
ACK bit is set and waits for the 8-bit slave address.
D
a
t
a
s
hift regi
s
ter
Comp
a
r
a
tor
Own
a
ddre
ss
regi
s
ter
Clock control
S
t
a
t
us
regi
s
ter
s
Control regi
s
ter
s
Control
Clock
control
D
a
t
a
control
S
CL
logic
D
ua
l
a
ddre
ss
regi
s
ter
D
a
t
a
regi
s
ter
PEC regi
s
ter
Interr
u
pt
s
PEC c
a
lc
u
l
a
tion
S
MBA
S
DA
Regi
s
ter (CCR)
(
S
R1&
S
R2)
(CR1&CR2)
DMA re
qu
e
s
t
s
& ACK
a
i171
8
9