EasyManua.ls Logo

ARTERY AT32F421C8T7 - Page 115

Default Icon
337 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
AT32F421 Series Reference Manual
2022.11.11 Page 115 Rev 2.02
register.
3. EV2: Address is matched successfully (ADDR7F=1). Reading STS1 and then STS2 clears the
ADDR7F bit. At this point, the master enters transmit stage, and both DT register and internal shift
register are empty. The TDBE bit is set 1 by hardware.
4. EV3: When the data is written to the DT register, it is directly moved to the shift register and the
SCL bus is released. The TDBE bit is still set 1 at this time.
5. EV4: The DT register remains empty but the shift register is not. Writing to the DT register clears
the TDBE bit.
6. The TDBE bit is set only after the second-to-last byte is sent.
7. EV5: TDC=1 indicates that the byte transmission is complete. The master sends a Stop condition
(STOPF=1). The TDBE bit and TDC bit are cleared automatically by hardware.
8. 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. EV6: 10-bit address head sequence is sent. Reading STS1 and writing to DT register clears the
ADDRHF bit.
4. EV2: Address is matched successfully (ADDR7F=1). Reading STS1 and then STS2 clears the
ADDR7F bit. In this case, the master enters transmit stage, and both DT register and internal shift
register are empty. The TDBE bit is set 1 by hardware.
5. EV3: When the data is written to the DT register, it is directly moved to the shift register and the
SCL bus is released. The TDBE bit is still set 1 at this time.
6. EV4: At this point, the DT register remains empty but the shift register is not. Writing to the DT
register clears the TDBE bit.
7. The TDBE bit is set only after the second-to-last byte is sent.
8. EV5: TDC=1 indicates that the byte transmission is complete. The master sends Stop condition
(STOPF=1). The TDBE bit and TDC bit is cleared by hardware.
9. End of communication.
Master receiver
Data reception depends on I
2
C interrupt priority:
1. I
2
C interrupts with very high priority
After the second-to-last byte is read, clear the ACKEN bit and set the GENSTOP bit in the
I2C_CTRL1 register to generate Stop condition.
If only one byte is to be received, clear the ADDR7F flag and set the ACKEN and GENSTOP bit
in the I2C_CTRL1 register.
After a byte is received, the I2C_STS1_RDBF bit is set 1 by hardware, and it is cleared after the
software read the I2C_DT register.

Table of Contents