Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
DMA Example for xplain 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:

  • Xplain

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 have been started
  • LED1: DMA completed successfully
  • LED2: CPU verified DMA transfer to be correct
  • LED3: CPU verified that source haven't been garbled
  • LED5: DMA transfer ended in failure
  • LED6: CPU verification of DMA transfer failed
  • LED7: CPU verification of source failed

In a successful operation LEDS 0, 1, 2 and 3 should light up in sequence, and on fault LEDS 5, 6 and 7 will light up.

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.