RM0453
transmitted, the I2C_PECR register content is transmitted and the TC flag is set after the
PEC transmission, stretching the SCL line low. The RESTART condition must be
programmed in the TC interrupt subroutine.
Caution:
The PECBYTE bit has no effect when the RELOAD bit is set.
Example SMBus master transmitter 2 bytes + PEC, automatic end mode (STOP)
NBYTES
INIT: program Slave address, program NBYTES = 3, AUTOEND=1, set PECBYTE, set START
EV1: TXIS ISR: wr data1
EV2: TXIS ISR: wr data2
Example SMBus master transmitter 2 bytes + PEC, software end mode (RESTART)
S
INIT
xx
NBYTES
INIT: program Slave address, program NBYTES = 3, AUTOEND=0, set PECBYTE, set START
EV1: TXIS ISR: wr data1
EV2: TXIS ISR: wr data2
EV3: TC ISR: program Slave address, program NBYTES = N, set START
Figure 304. Bus transfer diagrams for SMBus master transmitter
TXIS TXIS
S
Address
A
data1
EV1
INIT
EV2
TXE
xx
TXIS TXIS
Address
A
data1
A
EV1
EV2
3
Inter-integrated circuit (I2C) interface
A
data2
A
3
data2
A
PEC
RM0453 Rev 5
legend:
PEC
A
P
TC
A
Rstart
Address
EV3
N
transmission
reception
SCL stretch
legend:
transmission
reception
SCL stretch
MS19871V2
1091/1450
1113
Need help?
Do you have a question about the STM32WL5 Series and is the answer not in the manual?