AT32F421
Series Reference Manual
2022.11.11
Page 113
Rev 2.02
Slave receiver
Figure 11-4 shows the transfer sequence of slave receiver.
Figure 11-4 Transfer sequence of slave receiver
Address
S
A
Data1
A
SCL
Stretch
Data2
A
DataN
A
P
Master to Slave
Slave to Master
S = Start
A = Acknowledge
P = Stop
Example : I2C Slave receive N bytes from I2C Master .
EV1. I2C_STS1_ADDR7F = 1, Reading STS1 and then STS2 will clear the
event.
EV2. I2C_STS1_RDBF = 1
,
Reading the I2C_DT register will clear it.
EV3. When a stop condition is detected, I2C_STS1_STOPF = 1, reading STS1
and then writing CTRL1 register will clear the event
EV1
EV2
EV3
...
RDBF
Address Head
S
A
Address
A
SCL Stretch
Data1
A
Data2
A
DataN
A
P
EV2
EV3
...
EV1
7-bit address
10-bit address
EV2
EV2
EV2
EV2
0
R/W
0
R/W
7-bit address mode:
1. Wait for the master to send an address.
2. EV1: Address is matched (ADDR7F=1), and the slave pulls the SCL bus low. Reading STS1 and
then STS2 by software clears the ADDR7F bit. At this point, the SCL bus is released, and enters
receive stage.
3. The internal shift register receives the bus data and stores them to DT register.
4. EV2: After receiving the bytes, the RDBF bit is set to1. Reading the I2C_DT register clears the
RDBF bit.
5. EV3: After receiving the Stop condition from the master, STOPF=1 is activated. Reading STS1
and then writing to CTRL1 register clears the event.
6. End of communication.
10-bit address mode:
1. Wait for the master to send an address.
2. EV1: Address is matched (ADDR7F=1). The slave pulls the SCL bus low. Reading STS1 and then
STS2 by software clears the ADDR7F bit. At this point, the SCL bus is released, and enters
receive stage.
3. The internal shift register receives the bus data and stores them to DT register.
4. EV2: After receiving the byte, the RDBF bit is set to 1. Reading the I2C_DT register clears the
RDBF bit.
5. EV3: After receiving the Stop condition from the master, STOPF=1 is activated. Reading STS1
and then writing to CTRL1 register clears the event.
6. End of communication.