Programming Master Mode

The following registers must be programmed before entering Master mode:

  1. 1.TWIHS_MMR.DADR (+ IADRSZ + IADR if a 10-bit device is addressed): The device address is used to access slave devices in Read or Write mode.
  2. 2.TWIHS_CWGR.CKDIV + CHDIV + CLDIV: Clock Waveform register
  3. 3.TWIHS_CR.SVDIS: Disables the Slave mode
  4. 4.TWIHS_CR.MSEN: Enables the Master mode
Note: If the TWIHS is already in Master mode, the device address (DADR) can be configured without disabling the Master mode.