Programming Slave Mode

The following fields must be programmed before entering Slave mode:

  1. 1.TWIHS_SMR.SADR: The slave device address is used in order to be accessed by master devices in Read or Write mode.
  2. 2.(Optional) TWIHS_SMR.MASK can be set to mask some SADR address bits and thus allow multiple address matching.
  3. 3.TWIHS_CR.MSDIS: Disables the Master mode.
  4. 4.TWIHS_CR.SVEN: Enables the Slave mode.

As the device receives the clock, values written in TWIHS_CWGR are ignored.