625
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
22.6.2
I2C Control register 1 (I2C_CTRL1)
Address offset: 0x00
Reset value: 0x0000
Bit field
Name
Description
15
SWRESET
Software reset
Make sure the I2C bus is idle before resetting this bit.
0:I2C not reset;
1:I2C reset.
Note: This bit can be used when the I2C_STS2.BUSY bit is set to 1 and no stop condition is detected
on the bus.
14
Reserved
Reserved, the reset value must be maintained.
13
SMBALERT
SMBus alert
It can be set or cleared by software. When I2C_CTRL1.EN=0, it will be cleared by hardware.
0: SMBAlert pin go high. The response address header is followed by the NACK signal;
1: SMBAlert pin go low. The response address header is followed by the ACK signal.
12
PEC
Packet error checking
It can be set or cleared by software. It will be cleared by hardware when PEC has been transferred,
or by start or stop condition, or when I2C_CTRL1.EN=0.
0: No PEC transfer
1: PEC transfer.
Note: When arbitration is lost, the calculation of PEC is invalid.
11
ACKPOS
Acknowledge/PEC Position
(
for data reception
)
It can be set or cleared by software. Or when I2C_CTRL1.EN=0, it will be cleared by hardware.
0: I2C_CTRL1.ACKEN bit determines whether to send an ACK to the byte currently being
received; I2C_CTRL1.PEC bit indicates that the byte in the current shift register is PEC.
1: I2C_CTRL1.ACKEN bit etermines whether to send an ACK to the next received byte;
I2C_CTRL1.PEC bit indicates that the next byte received in the shift register is PEC.
Note
:
ACKPOS bit can only be used in 2-byte receiving configuration and must be configured before
receiving data.
For the second byte of NACK, the I2C_CTRL1.ACKEN bit must be cleared after the
I2C_STS1.ADDRF bit is cleared.
To detect the PEC of the second byte, the I2C_CTRL1.PEC bit must be set after the ACKPOS bit is
configured and when the ADDR event is extended.
10
ACKEN
Acknowledge enable