20.5.5 Packet Error Checking (PEC)
The Packet Error Checking mechanism improves reliability and communication robustness. CRC-8 packet error checking based on SMBus v3.0 specification is available. PEC is calculated on all the message bytes (including addresses and read/write bits). The PEC calculation does not include ACK/NACK bits, Start/Stop or Repeated Start conditions. PEC is available in both Host and Client mode.
During client/host transmission, PEC can be enabled or disabled to automatically append at the end of packet using PECC (I2CxCON2[29:28]) bits.
During reception, when PECC[1:0] is 01
, the calculated PEC value will be
written into I2CxPEC.CCRC at the end of the packet. Since the received packet will
contain a PEC byte at the end of the packet, the calculated PEC should be
0
if the packet was received correctly. Any mismatch in calculated
PEC and received PEC, CRC(I2CxSTAT[16]) will be set.