The following registers are enable-protected, meaning they can be written only when the I2C interface is disabled (CTRLA.ENABLE is ‘0’):

When the I2C is enabled or is being enabled (CTRLA.ENABLE=1), writing to these registers will be discarded. If the I2C is being disabled, writing to these registers will be completed after the disabling.

Enable-protection is denoted by the "Enable-Protection" property in the register description.

Before the I2C is enabled it must be configured as outlined by the following steps:
  1. 1.Select I2C Host or Client mode by writing 0x4 (Client mode) or 0x5 (Host mode) to the Operating Mode bits in the CTRLA register (CTRLA.MODE).
  2. 2.If desired, select the SDA Hold Time value in the CTRLA register (CTRLA.SDAHOLD).
  3. 3.If desired, enable smart operation by setting the Smart Mode Enable bit in the CTRLB register (CTRLB.SMEN).
  4. 4.If desired, enable SCL low time-out by setting the SCL Low Time-Out bit in the Control A register (CTRLA.LOWTOUT).
  5. 5.In Host mode:
    1. a.Select the inactive bus time-out in the Inactive Time-Out bit group in the CTRLA register (CTRLA.INACTOUT).
    2. b.Write the Baud Rate register (BAUD) to generate the desired baud rate.
    In Client mode:
    1. a.Configure the address match configuration by writing the Address Mode value in the CTRLB register (CTRLB.AMODE).
    2. b.Set the Address and Address Mask value in the Address register (ADDR.ADDR and ADDR.ADDRMASK) according to the address configuration.