RM0440
40.4.14
SMBus slave mode
This section is relevant only when SMBus feature is supported. Refer to
implementation.
In addition to I2C slave transfer management (refer to
some additional software flowcharts are provided to support SMBus.
SMBus Slave transmitter
When the IP is used in SMBus, SBC must be programmed to '1' in order to allow the PEC
transmission at the end of the programmed number of data bytes. When the PECBYTE bit
is set, the number of bytes programmed in NBYTES[7:0] includes the PEC transmission. In
that case the total number of TXIS interrupts is NBYTES-1 and the content of the
I2C_PECR register is automatically transmitted if the master requests an extra byte after the
NBYTES-1 data transfer.
Caution:
The PECBYTE bit has no effect when the RELOAD bit is set.
Figure 652. Transfer sequence flowchart for SMBus slave transmitter N bytes + PEC
SMBus slave
transmission
Slave initialization
No
I2C_ISR.ADDR =
1?
Yes
Read ADDCODE and DIR in I2C_ISR
I2C_CR2.NBYTES = N + 1
PECBYTE=1
Set I2C_ICR.ADDRCF
I2C_ISR.TXIS
=1?
Yes
Write I2C_TXDR.TXDATA
RM0440 Rev 1
Inter-integrated circuit (I2C) interface
Section 40.3: I2C
Section 40.4.8: I2C slave
stretched
No
mode)
SCL
MS19867V2
1857/2083
1885
Need help?
Do you have a question about the STM32G4 Series and is the answer not in the manual?
Questions and answers