Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
DMA Example for XMEGA-A1 Xplained Documentation

Introduction

This simple example shows how to use the Direct Memory Access controller (DMA).

Main Files

Device Info

All AVR XMEGA devices with a DMA controller can be used. This example have been tested with the following setup:

  • XMEGA-A1 Xplained
  • XMEGA-A3BU Xplained
  • XMEGA-B1 Xplained

Description of the example

This example will start a DMA transfer between two internal memory areas, and upon completion it will verify this by comparing those areas.

During the progress of the application it will output some information to the LEDS, and these LEDS have the following assignment:

  • LED0: DMA transaction has been started
  • LED1: DMA completed successfully

In a successful operation LED 0 will light up for a short time, then it will turn off and LED 1 will turn on to indicate transfer success. If LED 1 does not turn on after LED 0, a fault has occurred in the transfer.

Dependencies

This example depends on the following modules:

Compilation info

This software was written for the GNU GCC and IAR for AVR. Other compilers may or may not work.

Contact Information

For further information, visit Microchip.