23.4.8 I2Cx Control Register

Note:
  1. Automatically cleared to ‘0’ at the beginning of client transmission; automatically cleared to ‘0’ at the end of client reception.
  2. Automatically cleared to ‘0’ at the beginning of client transmission.
  3. When EPSZE is enabled, Smart mode (SMEN=1), clock stretching (STREN=1) and EOP function (EOPSC= “10” or “01” should be enabled.
  4. In Host mode , when ACKC != 00, hardware will automatically set ACKEN (I2CxCON1[4]) bit.
  5. In Host mode, this bit will be used by PSZ(I2CxCON2[15:0]) to count the data bytes.
  6. In Client mode, this bit is used for TX/RX interrupt generation.

    If ‘1’, Interrupt is generated only for data bytes. If ‘0’, Interrupt is generated for both address and data bytes.

  7. In Client mode, it should set the ND/A to ‘1’ before enabling transfers through DMA for data transfer.
  8. The packet size should be excluding of address byte(s). It should not be changed on fly and should be changed when the bus is in Idle state.
  9. In Host mode, the EOPSC and ND/A bit control the PSZ to decrement.
  10. For the host, the software has to clear the CRC calculator by setting I2CxCON2.PECC to “11” for new data frame transaction.
  11. To use the Auto-Append mode, the PECC needs to be set to “01” at least one data byte earlier than the CRC byte of data.
Table 23-9. Register Bit Attribute Legend
SymbolDescriptionSymbolDescriptionSymbolDescription
RReadable bitHCCleared by Hardware(Gray cell)Unimplemented
WWritable bitHSSet by HardwareXBit is unknown at Reset
CWrite to clearSSoftware settable bitxChannel number
Name: I2CxCON2
Offset: 0x189C, 0x18EC

Bit 3130292827262524 
 AMODE[1:0]PECC[1:0]BSCLTEHBCTECBCTEEPSZE 
Access R/WR/WR/WR/WR/WR/WR/WR/W 
Reset 00000000 
Bit 2322212019181716 
 ACKC[1:0]HNACKIGNEOPSC[1:0]ND/ASMENBITE 
Access R/WR/WR/WR/W/HCR/W/HCR/WR/WR/W 
Reset 00000000 
Bit 15141312111098 
 PSZ[15:0] 
Access R/W/HCR/W/HCR/W/HCR/W/HCR/W/HCR/W/HCR/W/HCR/W/HC 
Reset 00000000 
Bit 76543210 
 PSZ[15:0] 
Access R/W/HCR/W/HCR/W/HCR/W/HCR/W/HCR/W/HCR/W/HCR/W/HC 
Reset 00000001 

Bits 31:30 – AMODE[1:0] Address Mode bit

ValueDescription
11Reserved
10The client responds to the range of addresses between and including I2CxADD and I2CxMSK. I2CxMSK is the upper limit
01The client responds to the two unique addresses in I2CxADD and I2CxMSK
00I2CxMSK is used as a mask to the I2CxADD register

Bits 29:28 – PECC[1:0]  PEC Control bit(10,11)

ValueDescription
11PEC reset
10PEC append is disabled. CRC-8 calculator will be active.

On a read request (receive), calculated CRC-8 is copied into CCRC (I2CxPEC[15:8]) at EOP.

On a write request (transmit), calculated CRC-8 is copied into CCRC (I2CxPEC[15:8]) at EOP.

01

Calculated CRC-8 is appended at the end of a packet.

On a read request (receive), calculated CRC-8 is copied into CCRC (I2CxPEC[15:8]) and received CRC will be copied into RCRC (I2CxPEC[7:0]) at EOP.

On a write Request (transmit), calculated CRC-8 will be automatically appended and also copied into CCRC (I2CxPEC[15:8]) at the end of the data transmission. PEC will be get reset after appending.

00PEC disabled

Bit 27 – BSCLTE Bus SCL Time-out Enable bit

ValueDescription
1SCL low time-out enabled
0SCL low time-out disabled

Bit 26 – HBCTE Host Bus SCL Cumulative (Extended time) Low Time-out Enable bit

ValueDescription
1SCL Cumulative low extended time-out enable
0SCL Cumulative low extended time-out disable

Bit 25 – CBCTE Client Bus SCL Cumulative (Extended time) Low Time-out Enable bit

ValueDescription
1SCL Cumulative low extended time-out enable
0SCL Cumulative low extended time-out disable

Bit 24 – EPSZE  Extended Packet Size Enable bit (Valid for Client Receive mode only)(3)

ValueDescription
1Extended packet size enabled after EOP=1
0Extended packet size disable

Bits 23:22 – ACKC[1:0]  ACK Control bit(4)

ValueDescription
11

Host: ACK all the bytes except the CRC byte; for the CRC byte, NACK will be sent

Client: ACK all the bytes and for the last byte, which is the CRC byte, ACK or NACK based on CRC result
  • If the CRC is 0, an ACK is sent
  • If the CRC is non-zero, a NACK is sent (to be used only on PECC[1:0] = “01” Auto-Append mode)
10ACK all the bytes and the last byte will be NACKed (to be used only for last packet)
01ACK all bytes including end of packet (to be used for extended packets)
00

ACK/NACK based on ACKDT and BOEN (client)

ACK/NACK based on ACKEN and ACKDT (host)

Bit 21 – HNACKIGN Host NACK Response Ignore Control bit

ValueDescription
1Host treats all NACK responses as ACK
0Normal operation; host treats NACK responses as NACK only

Bits 20:19 – EOPSC[1:0] End of Packet Status Control bit

ValueDescription
11Reserved
10I2CxSTAT2.EOP will be set after data bytes and PEC
01I2CxSTAT2.EOP will be set after data bytes
00End of packet function is disabled

Bit 18 – ND/A  Next Data/Address Byte Transmission bit(5,6,7)

ValueDescription
1Next transmission is a data byte transmission
0Next transmission is an address byte transmission

Bit 17 – SMEN Smart Mode Enable bit

ValueDescription
1Smart mode is enable
0Smart mode is disabled

Bit 16 – BITE Bus Idle Time-out Enable bit

ValueDescription
1Bus idle time-out enable
0Bus idle time-out disabled

Bits 15:0 – PSZ[15:0]  Packet Size bits(8,9)

Sets the size of the packet to transfer/receive; the valid range is from 0 to 65535 bytes. Use I2CxCONC.PSZ=0 for the SMBus Quick Command protocol.