AT32F425
Series Reference Manual
2022.03.30
Page 126
Ver 2.01
software, and then write the first data to the TXDT register, the TDBE is cleared
―
Write operation through interrupts or DMA: Clear the TXDT register by setting the TDBE bit
through software, then set the TDIS bit to generate a TDIS event, which generates an interrupt
or DMA request. At this point, data is written to the TXDT register using DMA or interrupt
functions.
6.
Data transfer (slave receive, clock stretching enabled, STRETCH=0)
After address matching:
1.
I2C_RXDT register becomes empty, the shift register becomes empty, and RDBF=0 in the
I2C_STS register
2.
Upon the receipt of data, RDBF=1; The RDBF is cleared by read operation to the RXDT register
3.
Repeat step 2 until the completion of all data transfer
4.
Wait for the generation of a STOP condition. Once received, the STOPF is set in the I2C_STS
register. The STOPF can be cleared by writing 1 to the STOPC bit in the I2C_CLR register,
transfer ends.
In slave receive mode, the slave byte control mode can be used for data reception. This mode
allows to control ACK/NACK signals of each byte received. This mode is typically available in SMBus
protocol. Refer to Section 114.2 for more information about this mode.
Note that the slave must read the received data in the case of the clock stretching being disabled
(STRETCH=1). If one-byte data has been received and data is not read yet before the end of the
next data reception, an overrun error occurs, setting the OUF bit in the I2C_STS register, and
sending NCAK.
An interrupt will be generated if the corresponding interrupt enable bit is enabled. For more
information about interrupt generation, refere to the interrupt chapter.