Auto-Load I2CxCNT

The I2CxCNT register can be automatically loaded. Auto-loading of the I2CxCNT register is enabled when the Auto-Load I2C Count Register Enable (ACNT) bit is set (ACNT = 1). The ACNT Mode Selection (ACNTMD) bits determine how the received bytes are loaded into I2CxCNT register. The user can choose between lower byte, upper byte, or both.

Important: It is not necessary to preload the I2CxCNT register when using the auto-load feature. If no value is loaded by the 9th falling SCL edge following an address transmission or reception, the Byte Count Interrupt Flag (CNTIF) will be set by module hardware and must be cleared by software to prevent an interrupt event before I2CxCNT is updated. Alternatively, I2CxCNT can be preloaded with a nonzero value to prevent CNTIF from being set. In this case, the preloaded value will be overwritten once the new count value has been loaded into I2CxCNT.