DocID025202 Rev 7
816/1080
RM0365
Inter-integrated circuit (I2C) interface
834
DMA must be initialized before setting the START bit. The end of transfer is managed
with the NBYTES counter.
•
In slave mode with NOSTRETCH=0, when all data are transferred using DMA, the
DMA must be initialized before the address match event, or in the ADDR interrupt
subroutine, before clearing the ADDR flag.
•
If SMBus is supported (see
Section 28.3: I2C implementation
): the PEC transfer is
managed with the NBYTES counter. Refer to
SMBus Slave receiver on page 807
and
SMBus Master receiver on page 811
Note:
If DMA is used for reception, the RXIE bit does not need to be enabled.
28.4.17 Debug
mode
When the microcontroller enters debug mode (core halted), the SMBus timeout either
continues to work normally or stops, depending on the DBG_I2Cx_SMBUS_TIMEOUT
configuration bits in the DBG module.
28.5 I2C
low-power
modes
28.6 I2C
interrupts
The table below gives the list of I2C interrupt requests.
Table 149. low-power modes
Mode Description
Sleep
No effect
I2C interrupts cause the device to exit the Sleep mode.
Stop
The contents of I2C registers are kept.
Standby The I2C peripheral is powered down and must be reinitialized after exiting Standby.
Table 150. I2C Interrupt requests
Interrupt event
Event flag
Event flag/Interrupt
clearing method
Interrupt enable
control bit
Receive buffer not empty
RXNE
Read I2C_RXDR
register
RXIE
Transmit buffer interrupt status
TXIS
Write I2C_TXDR
register
TXIE
Stop detection interrupt flag
STOPF
Write STOPCF=1
STOPIE
Transfer Complete Reload
TCR
Write I2C_CR2 with
NBYTES[7:0]
≠
0
TCIE
Transfer complete
TC
Write START=1 or
STOP=1
Address matched
ADDR
Write ADDRCF=1
ADDRIE
NACK reception
NACKF
Write NACKCF=1
NACKIE