Figure 290. Bus Transfer Diagrams For Smbus Master Transmitter - STMicroelectronics STM32WLEx Reference Manual

Advanced arm-based 32-bit mcus with sub-ghz radio solution
Table of Contents

Advertisement

RM0461
When the SMBus master wants to send a RESTART condition after the PEC, software
mode must be selected (AUTOEND=0). In this case, once NBYTES - 1 have been
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 290. 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
RM0461 Rev 5
legend:
PEC
A
P
TC
A
Rstart
Address
EV3
N
transmission
reception
SCL stretch
legend:
transmission
reception
SCL stretch
MS19871V2
991/1306
1014

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32WLEx and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents