Data Receive with the DMA in Slave Mode

The following procedure shows an example to transmit data with DMA where the number of characters to receive is known.

  1. 1.Initialize the DMA (channels, memory pointers, size, etc.).
  2. 2.Configure the Slave mode.
  3. 3.Enable the DMA.
  4. 4.Wait for the DMA status flag indicating that the buffer transfer is complete.
  5. 5.Disable the DMA.
  6. 6.(Only if peripheral clock must be disabled) Wait for the TXCOMP flag to be raised in TWIHS_SR.