
GD32L23x User Manual
503
Bits
Fields
Descriptions
31:27
Reserved
Must be kept at reset value.
26
PECTRANS
PEC Transfer
Set by software.
Cleared by hardware in the following 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 when RELOAD=1, or SBCTL=0 in slave mode.
25
AUTOEND
Automatic end mode in master mode
0: TC bit is set when the transfer of BYTENUM[7:0] bytes is completed.
1: a STOP condition is sent automatically when the transfer of BYTENUM[7:0] bytes
is completed.
Note:
This bit works only when RELOAD=0. This bit is set and cleared by software.
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] will be reloaded. Every time when the BYTENUM[7:0] bytes
have been transferred, the TCR bit in I2C_STAT register will be set.
This bit is set and cleared by software.
23:16
BYTENUM[7:0]
Number of bytes to be transferred
These bits are programmed with the number of bytes to be transferred. When
SBCTL=0, these bits have no effect.
Note:
These bits should not be modified when 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 software, and cleared by hardware when the NACK is
sent, or when a STOP condition is detected or ADDSEND is set, or when I2CEN=0.
When PEC is enabled, whether to send an ACK or a NACK is not depend on the
NACKEN bit. When SS=1, and the OUERR bit is set, the value of NACKEN is
ignored and a NACK will be sent.
14
STOP
Generate a STOP condition on I2C bus
This bit is set by software and cleared by hardware when I2CEN=0 or STOP
condition is detected.
0: STOP will not be sent
1: STOP will be sent
13
START
Generate a START condition on I2C bus
This bit is set by software and cleared by hardware after the address is sent. When