GD32W51x User Manual
664
16
TR
Whether the I2C is a transmitter or a receiver in slave mode
This bit is updated w hen the ADDSEND bit is set.
0: Receiver
1: Transmitter
15
I2CBSY
Busy flag
This bit is set by hardw are w hen a START condition is detected and cleared by
hardw are after a STOP condition. When I2CEN=0, this bit is also cleared by
hardw are.
0: No I2C communication.
1: I2C communication active.
14
Reserved
Must be kept at reset value.
13
SMBALT
SMBus Alert
When SMBHAEN=1, SMBALTEN=1, and a SMBALERT event (falling edge) is
detected on SMBA pin, this bit w ill be set by hardw are. It is cleared by softw are by
setting the SMBALTC bit.
This bit is cleared by hardw are w hen I2CEN=0.
0: SMBALERT event is not detected on SMBA pin
1: SMBALERT event is detected on SMBA pin
12
TIMEOUT
TIMEOUT flag.
When a timeout or extended clock timeout occurred, this bit w ill be set. It is cleared
by softw are by setting the TIMEOUTC bit and cleared by hardw are w hen I2CEN =0.
0: no timeout or extended clock timeout occur
1: a timeout or extended clock timeout occur
11
PECERR
PEC error
This flag is set by hardw are w hen the received PEC does not match w ith the content
of I2C_PEC register. Then a NACK is automatically sent. It is cleared by softw are
by setting the PECERRC bit and cleared by hardw are w hen I2CEN=0.
0: Received PEC and content of I2C_PEC match
1: Received PEC and content of I2C_PEC
don’t match, I2C w ill send NACK
regardless of NACKEN bit.
10
OUERR
Overrun/Underrun error in slave mode
In slave mode w ith SS=1, w hen an overrun/underrun error occurs, this bit w ill be set
by hardw are. It is cleared by softw are by setting the OUERRC bit and cleared by
hardw are w hen I2CEN=0.
0: No overrun or underrun occurs
1: Overrun or underrun occurs
9
LOSTARB
Arbitration Lost
It is cleared by softw are by setting the LOSTARBC bit and cleared by hardw are
w hen I2CEN=0.
0: No arbitration lost.
1: Arbitration lost occurs and the I2C block changes back to slave mode.