31.4.1 Initialization

  1. Select I2C Host or Client mode by writing to the Operating Mode bits in the Control A register (CTRLA.MODE).
  2. In Host mode:
    1. Select the inactive bus time-out in the Inactive Time-Out bit group in the Control A register (CTRLA.INACTOUT).
    2. Write the Baud Rate register (BAUD) to generate the desired baud rate.
    In Client mode:
    1. Configure the address match configuration by writing the Address Mode value in the Control B register (CTRLB.AMODE).
    2. Set the Address and Address Mask value in the Address register (ADDR.ADDR and ADDR.ADDRMASK) according to the address configuration.
  3. Enable the module by writing to the Enable bit in the Control A register (CTRLA.ENABLE).