GD32A50x User Manual
537
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 signal 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 signal 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 signal on I2C bus
This bit is set by software and cleared by hardware when I2CEN=0 or STOP signal
is detected.
0: STOP will not be sent
1: STOP will be sent
13
START
Generate a START signal on I2C bus
This bit is set by software and cleared by hardware after the address is sent. When
the arbitration is lost, or a timeout error occurred, or I2CEN=0, this bit can also be
cleared by hardware. It can be cleared by software by setting the ADDSENDC bit
in I2C_STATC register.
0: START will not be sent
1: START will be sent
12
HEAD10R
10-bit address header executes read direction only in master receive mode
0: The 10 bit master receive address sequence is START + header of 10-bit address