Download Print this page

ST STM32L4+ Series Reference Manual page 1693

Hide thumbs Also See for STM32L4+ Series:

Advertisement

RM0432
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 487. 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
RM0432 Rev 6
legend:
PEC
A
P
TC
A
Rstart
Address
EV3
N
transmission
reception
SCL stretch
legend:
transmission
reception
SCL stretch
MS19871V2
1693/2301
1717

Advertisement

loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel