GD32W51x User Manual
665
8
BERR
Bus error
When an unexpected START or STOP condition on I2C bus is detected, a bus error
occurs and this bit w ill be set. It is cleared by softw are by setting BERRC
bit and
cleared by hardw are w hen I2CEN=0.
0: No bus error
1: A bus error detected
7
TCR
Transfer complete reload
This bit is set by hardw are w hen RELOAD=1 and data of BYTENUM[7:0] bytes have
been transferred. It is cleared by softw are w hen BYTENUM[7:0] is w ritten to a non-
zero value.
0: When RELOAD=1, transfer of BYTENUM[7:0] bytes is not completed
1: When RELOAD=1, transfer of BYTENUM[7:0] bytes is completed
6
TC
Transfer complete in master mode
This bit is set by hardw are w hen RELOAD=0, AUTOEND=0 and data of
BYTENUM[7:0] bytes have been transferred. It is cleared by softw are w hen START
bit or STOP bit is set.
0: Transfer of BYTENUM[7:0] bytes is not completed
1: Transfer of BYTENUM[7:0] bytes is completed
5
STPDET
STOP condition detected in slave mode
This flag is set by hardw are w hen a STOP condition is detected on the bus. It is
cleared by softw are by setting STPDETC bit and cleared by hardw are w hen
I2CEN=0.
0: STOP condition is not detected.
1: STOP condition is detected.
4
NACK
Not Acknow ledge flag
This flag is set by hardw are w hen a NACK is received. It is cleared by softw are by
setting NACKC bit and cleared by hardw are w hen I2CEN=0.
0: ACK is received.
1: NACK is received.
3
ADDSEND
Address received matches in slave mode.
This bit is set by hardw are w hen the received slave address matched w ith one of
the enabled slave addresses. It is cleared by softw are by setting ADDSENDC bit
and cleared by hardw are w hen I2CEN=0.
0: Received address not matched
1: Received address matched
2
RBNE
I2C_RDATA is not empty during receiving
This bit is set by hardw are w hen the received data is shift into the I2C_RDA TA
register. It is cleared w hen I2C_RDA TA is read.
0: I2C_RDATA is empty
1: I2C_RDATA is not empty, softw are can read