13.5.1 Basic Setup

To set up a DMA channel for any data transfer:

  1. Enable the DMA Controller (ON = 1) and select an appropriate channel priority scheme by setting or clearing the PRIORITY bit.
  2. Program DMAHIGH and DMALOW with the appropriate upper and lower address boundaries for data RAM operations.
  3. Select the DMA channel to be used and disable its operation (CHEN = 0).
  4. Program the appropriate source and destination addresses for the transaction into the channel’s DMAxSRC and DMAxDST registers. For PIA Mode Addressing, use the base address value.
  5. Program the RELOAD registers for source address, destination address and count depending on the transfer modes used.
  6. Program the DMAxCNT register for the number of triggers per transfer (One-Shot or Continuous modes) or the number of words (bytes) to be transferred (Repeated modes).
  7. Configure the SIZE[1:0] bits to select the data size.
  8. Program the TRMODE[1:0] bits to select the Data Transfer mode.
  9. Program the SAMODE[1:0] and DAMODE[1:0] bits to select the Addressing mode.
  10. Program the CHSEL[7:0] bits to select the trigger source
  11. Enable the DMA channel by setting the CHEN bit.
  12. Enable the trigger source interrupt.