AT32WB415
Series Reference Manual
2022.04.13
Page 122
Ver 2.00
6.
EV3: The RDBF bit is set 1 after receiving the byte, and it is cleared when the I2C_DT register
is read.
7.
End of communication.
10-bit address mode:
1.
Generate 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 sequence is sent. Read STS1 and write to DT register can
clear the ADDRHF bit.
4.
EV2: Address is matched successfully (ADDR7F=1). Read STS1 and then STS2 will clear
the ADDR7F bit, and the master re-send Start condition.
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). Read STS1 and then STS2 will clear
the ADDR7F bit, and the master enters receive stage.
7.
EV3: The RDBF bit is set 1 after receiving the byte, and it is cleared when the I2C_DT register
is read.
8.
EV4: TDC=1, the contens in the I2C_DT is N-2, and that of the shift register is N-1. The
ACKEN is set 0 by software and the data N-2 is read, afterwards, the GENSTOP=1, and data
N-1 is read.
9.
EV3: The RDBF bit is set 1 after receiving the byte, and it is cleared when the I2C_DT register
is read.
10. End of communication.
3.
When I2C interrupt priority is not very high but the number of bytes to receive is equal to 2
Set the MACKCTRL bit in the I2C_CTRL1 register before data reception. When the address is
matched, clear ACKEN bit and then the ADDR7F bit. When the TDC bit is set 1, set the
GENSTOP bit in the I2C_CTRL1 register, and then read the DT register.
Figure 11-8 Transfer sequence of master receiver when N=2
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