GD32W51x User Manual
658
Bits
Fields
Descriptions
31:27
Reserved
Must be kept at reset value.
26
PECTRA NS
PEC Transfer
Set by softw are.
Cleared by hardw are in the follow ing cases:
When PEC byte is transferred or ADDSEND bit is set or STOP condition is detected
or I2CEN=0.
0: Don’t transfer PEC value
1: Transfer PEC
Note:
This bit has no effect w hen RELOAD=1, or SBCTL=0 in slave mode.
25
AUTOEND
Automatic end mode in master mode
0: TC bit is set w hen the transfer of BYTENUM[7:0] bytes is completed.
1: a STOP condition is sent automatically w hen the transfer of BYTENUM[7:0] bytes
is completed.
Note:
This bit w orks only w hen RELOAD=0. This bit is set and cleared by softw are.
24
RELOAD
Reload mode
0: After the data of BYTENUM[7:0] bytes transfer, the transfer is completed.
1: After data of BYTENUM[7:0] bytes transfer, the transfer is not completed and the
new BYTENUM[7:0] w ill be reloaded. Every time w hen the BYTENUM[7:0] bytes
have been transferred, the TCR bit in I2C_STAT register w ill be set.
This bit is set and cleared by softw are.
23:16
BYTENUM[7:0]
Number of bytes to be transferred
These bits are programmed w ith the number of bytes to be transferred. When
SBCTL=0, these bits have no effect.
Note:
These bits should not be modified w hen the START bit is set.
15
NACKEN
Generate NACK in slave mode
0: an ACK is sent after receiving a new byte.
1: a NACK is sent after receiving a new byte.
Note:
The bit can be set by softw are, and cleared by hardw are w hen the NACK is
sent, or w hen a STOP condition is detected or ADDSEND is set, or w hen I2CEN =0.
When PEC is enabled, w hether to send an ACK or a NACK is not depend on the
NACKEN bit. When SS=1, and the OUERR bit is s et, the value of NACKEN is
ignored and a NACK w ill be sent.
14
STOP
Generate a STOP condition on I2C bus
This bit is set by softw are and cleared by hardw are w hen I2CEN=0 or STOP
condition is detected.
0: STOP w ill not be sent
1: STOP w ill be sent
13
START
Generate a START condition on I2C bus
This bit is set by softw are and cleared by hardw are after the address is sent. When