AT32F421
Series Reference Manual
2022.11.11
Page 111
Rev 2.02
In 10-bit mode
―
Only matches OADDR1
Support special slave address:
Broadcast call address (0b0000000x): This address is enabled when GCAEN=1.
SMBus device default address (0b1100001x): This address is enabled for SMBus address
resolution protocol in SMBus device mode.
SMBus master default address (0b0001000x): This address is enabled for SMBus master
notification protocol in SMBus master mode.
SMBus alert address (0b0001100x): This address is enabled for SMBus alert response address
protocol in SMBus master mode when SMBALERT = 1
Refer to SMBus2.0 protocol for more information.
Slave address matching procedure:
Receive a Start condition
Address matching
The slave sends an ACK if address is matched.
ADDR7F is set, with DIRF indicating the transmission direction
―
When DIRF =0, slave enters receiver mode, starting receiving data.
―
When DIRF =1, slave enters transmitter mode, starting transmitting data
5. Clock stretching capability
Clock stretching is enabled by setting the STRETCH bit in the I2C_CTRL1 register. Once enabled,
when the slave cannot process data in a timely manner on certain conditions, it will pull down SCL
line to low level to stop communication in order to prevent data loss.
Transmitter mode:
―
Clock stretching enable: If no data is written to the I2C_DT register before the next byte
transmission (the first SCL rising edge of the next data), the I
2
C interface will pull down SCL
bus and wait until the data is written to the I2C_DT
―
Clock stretching disable: if no data is written to the I2C_DT register before the next byte
transmission (the first SCL rising edge of next data), an underrun error will happen.
Receiver mode
―
Clock stretching enable: When the shift register has received another byte before the data in
the I2C_DT register is read, the I
2
C will hold the SCL bus low to wait for the software to read
I2C_DT register
―
Clock stretching disable: The data in the I2C_DT register is not yet read when the shift register
receives another byte. In this case, if another data is received, an overrun error occurs.
11.4.1 I
2
C slave communication flow
Initialization
Enable I
2
C peripheral clock, and configure the clock-related bits in the I2C_CTRL2 register to get correct
timings, and then wait for I
2
C master to send a Start condition.
Transmitter
Figure 11-3 shows the transfer sequence of slave transmitter.