Figure 303. Bus Transfer Diagrams For Smbus Slave Receiver (Sbc = 1) - STMicroelectronics STM32WL5 Series Reference Manual

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

Advertisement

Inter-integrated circuit (I2C) interface

Figure 303. Bus transfer diagrams for SMBus slave receiver (SBC = 1)

Example SMBus slave receiver 2 bytes + PEC
NBYTES
EV1: ADDR ISR: check ADDCODE and DIR, program NBYTES = 3, PECBYTE=1, RELOAD=0, set ADDRCF
EV2: RXNE ISR: rd data1
EV3: RXNE ISR: rd data2
EV4: RXNE ISR: rd PEC
Example SMBus slave receiver 2 bytes + PEC, with ACK control
(RELOAD=1/0)
S
Address
NBYTES
EV1: ADDR ISR: check ADDCODE and DIR, program NBYTES = 1, PECBYTE=1, RELOAD=1, set ADDRCF
EV2: RXNE-TCR ISR: rd data1, program NACK=0 and NBYTES = 1
EV3: RXNE-TCR ISR: rd data2, program NACK=0, NBYTES = 1 and RELOAD=0
EV4: RXNE-TCR ISR: rd PEC
This section is relevant only when the SMBus feature is supported (refer to
In addition to I2C master transfer management (refer to
software flows are provided to support the SMBus.
SMBus master transmitter
When the SMBus master wants to transmit the PEC, the PECBYTE bit must be set and the
number of bytes must be programmed in the NBYTES[7:0] field, before setting the START
bit. In this case the total number of TXIS interrupts is NBYTES - 1. So if the PECBYTE bit is
set when NBYTES = 0x1, the content of the I2C_PECR register is automatically transmitted.
If the SMBus master wants to send a STOP condition after the PEC, automatic end mode
must be selected (AUTOEND = 1). In this case, the STOP condition automatically follows
the PEC transmission.
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
1090/1450
ADDR
S
Address
A
data1
EV1
ADDR
RXNE,TCR
A
data1
E
V
1
1
RXNE
RXNE
A
data2
A
PEC
EV2
EV3
3
RXNE,TCR
A
data2
A
E
V
2
E
V
3
RM0453 Rev 5
RXNE
A
P
EV4
legend :
RXNE
PEC
A
P
EV4
Section
34.4.9), some additional
RM0453
legend:
transmission
reception
SCL stretch
transmission
reception
SCL stretch
MS19870V2
Section
34.3).

Advertisement

Table of Contents
loading
Need help?

Need help?

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

This manual is also suitable for:

Stm32wl55 seriesStm32wl54 series

Table of Contents