Inter-integrated circuit (I2C) interface
Note:
At every clock pulse, after SCL falling edge detection, the I2C master or slave stretches SCL
low during at least [(SDADEL+SCLDEL+1) x (PRESC+1) + 1] x t
and reception modes. In transmission mode, in case the data is not yet written in I2C_TXDR
when SDADEL counter is finished, the I2C keeps on stretching SCL low until the next data
is written. Then new data MSB is sent on SDA output, and SCLDEL counter starts,
continuing stretching SCL low to guarantee the data setup time.
If NOSTRETCH=1 in slave mode, the SCL is not stretched. Consequently the SDADEL
must be programmed in such a way to guarantee also a sufficient setup time.
Table 371. I
Symbol
Parameter
t
Data hold time
HD;DAT
t
Data valid time
VD;DAT
t
Data setup time
SU;DAT
Rise time of both SDA
t
r
and SCL signals
Fall time of both SDA
t
f
and SCL signals
Additionally, in master mode, the SCL clock high and low levels must be configured by
programming the PRESC[3:0], SCLH[7:0] and SCLL[7:0] bits in the I2C_TIMINGR register.
•
When the SCL falling edge is internally detected, a delay is inserted before releasing
the SCL output. This delay is
t
I2CCLK.
t
SCLL
•
When the SCL rising edge is internally detected, a delay is inserted before forcing the
SCL output to low level. This delay is
(PRESC+1) x t
Refer to
Caution:
Changing the timing configuration is not allowed when the I2C is enabled.
The I2C slave NOSTRETCH mode must also be configured before enabling the peripheral.
Refer to
Caution:
Changing the NOSTRETCH configuration is not allowed when the I2C is enabled.
1824/2083
2
C-SMBUS specification data setup and hold times
Standard-mode
(Sm)
Min.
Max
0
-
3.45
250
-
1000
-
300
impacts the SCL low time
t
I2CCLK.
SCLH
I2C master initialization
I2C slave initialization
Fast-mode
(Fm)
Min.
Max
-
0
-
-
0.9
-
100
-
-
300
-
300
t
= (SCLL+1) x t
SCLL
t
LOW .
t
= (SCLH+1) x t
SCLH
impacts the SCL high time
for more details.
for more details.
RM0440 Rev 1
, in both transmission
I2CCLK
Fast-mode Plus
SMBUS
(Fm+)
Min.
Max
Min.
0
-
0.3
-
0.45
-
50
-
250
-
120
-
-
120
-
where
t
= (PRESC+1) x
PRESC
PRESC
where
PRESC
t
HIGH .
RM0440
Unit
Max
-
µs
-
-
1000
ns
300
t
=
PRESC
Need help?
Do you have a question about the STM32G4 Series and is the answer not in the manual?
Questions and answers