RM0091 Inter-integrated circuit (I
2
C) interface
Doc ID 018940 Rev 1 513/742
Figure 225. Bus transfer diagrams for SMBus master receiver
23.4.15 Wakeup from STOP on address match
This section is relevant only when Wakeup from STOP feature is supported. Please refer to
Section 23.3: I2C implementation.
The I2C is able to wakeup the MCU from STOP mode (APB clock is off), when it is
addressed. All addressing modes are supported.
Wakeup from STOP is enabled by setting the WUPEN bit in the I2Cx_CR1 register. The HSI
oscillator must be selected as the clock source for I2CCLK in order to allow wakeup from
STOP.
During STOP mode, the HSI is switched off. When a START is detected, the I2C interface
switches the HSI on, and stretches SCL low until HSI is woken up.
MS19872V1
Example SMBus master receiver 2 bytes + PEC, automatic end mode (STOP)
Address
S
INIT: program Slave address, program NBYTES = 3, AUTOEND=1, set PECBYTE, set START
EV1: RXNE ISR: rd data1
EV2: RXNE ISR: rd data2
EV3: RXNE ISR: rd PEC
A
data1
A
RXNE RXNE
data2
A
NBYTES
NA
legend:
transmission
reception
SCL stretch
3VE1VE
xx 3
INIT
Example SMBus master receiver 2 bytes + PEC, software end mode (RESTART)
Address
S
INIT: program Slave address, program NBYTES = 3, AUTOEND=0, set PECBYTE, set START
EV1: RXNE ISR: rd data1
EV2: RXNE ISR: rd data2
EV3: RXNE ISR: read PEC
EV4: TC ISR: program Slave address, program NBYTES = N, set START
A
data1
A
RXNE RXNE
data2
A
NBYTES
Restart
legend:
transmission
reception
SCL stretch
EV1 EV2
xx
INIT
Address
N
PEC
P
RXNE
EV2
NA
PEC
RXNE
3
EV3
TC
EV4