
AT32F413
Series Reference Manual
2022.06.27
Page 130
Rev 2.00
7.
EV2: Address is matched successfully (ADDR7F=1). Clear the ACKEN bit and read STS1
and STS2 clears the ADDR7F bit, the master enters receive state at this time.
8.
EV3: TDC=1, set GENSTOP=1, and then read the I2C_DT register twice.
9.
End of communication.
4.
When I2C interrupt priority is not very high but the number of bytes to receive is equal to 1
After the address is matched, clear the ACKEN bit and then ADDR7F bit, then set the GENSTOP
bit in the I2C_CTRL1 register. Wait until the RDBF bit is set 1 before reading the DT register.
Figure 11-9 Transfer sequence of master receiver when N=1
Address
S
1
A
Data1
NA
SCL
Stretch
P
Master to Slave
Slave to Master
RS = Repeated Start
S = Start
A = Acknowledge
P = Stop
Example : I2C Master receive 1 bytes from I2C Slave .
EV1. I2C_STS1_STARTF=1, reading STS1 and write the address to
I2C_DT will clear the event.
EV2. I2C_STS1_ADDR7F = 1, clear the I2C_CTRL1_ACKEN bit, and
reading STS1 and then STS2 will clear the event, then set the
I2C_CTRL1_GENSTOP bit = 1.
EV3. I2C_STS1_RDBF =1,reading the I2C_DT register will clear the
event.
EV4. I2C_STS1_ADDR7F = 1, reading STS1 and then STS2 will
clear the event.
EV5. I2C_STS1_ADDRHF= 1, reading STS1 and write I2C_DT
register will clear the event.
EV2
EV3
RDBF
Address Head
S
A
SCL
Stretch
Address
A
EV4
EV5
10-bit address
Address Head
RS
SCL Stretch
A
Data1
NA
SCL Stretch
P
EV2
EV3
7-bit address
R/W
0
R/W
1
R/W
SCL
Stretch
EV1
SCL
Stretch
EV1
SCL Stretch
EV1
7-bit address mode:
1.
Generate a Start condition (GENSTART=1)
2.
EV1: Start condition is ready (STARTF=1). Read STS1 and write the address to DT register.
3.
EV2: Address is matched successfully (ADDR7F=1). Clear the ACKEN bit, reading STS1 and
then STS2 clears the ADDR7F bit. Afterwards, set GENSTOP=1, the master enters receive
stage at this time.
4.
EV3: RDBF=1. Reading the I2C_DT register clears the RDBF.
5.
End of communication.
10-bit address mode:
1.
Generate a Start condition (GENSTART=1)
2.
EV1: Start condition is ready (STARTF=1). Read STS1 and write the address to DT register.
3.
EV5: 10-bit address head is sent. Read STS1 and write to DT register can clear the
ADDRHF bit.
4.
EV4: Address is matched successfully (ADDR7F=1). Reading STS1 and STS2 clears the
ADDR7F bit, the master re-sends Start condition (GENSTART=1).
5.
EV1: Start condition is ready (STARTF=1). Read STS1 and write the address to the DT
register.
6.
EV2: Address is matched successfully (ADDR7F=1). Clearing the ACKEN bit, read STS1 and
then STS2 clears the ADDR7F bit. Afterwards, set GENSTOP=1, the master enters receive