Data Sheet

275
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181G–SAM-D21_Datasheet–09/2015
19.6 Functional Description
19.6.1 Principle of Operation
The DMAC consists of a DMA module and a CRC module.
19.6.1.1 DMA
The DMAC can, without interaction from the CPU, transfer data between peripherals and memories. The data transferred
by the DMAC are called transactions, and these transactions can be split into smaller data transfers. Figure 19-2
shows
the relationship between the different transfer sizes.
Figure 19-2. DMA Transfer Sizes
z Beat transfer: Defined as the size of one data transfer bus access, and the size is selected by writing the Beat Size
bit group in the Block Transfer Control register (BTCTRL.BEATSIZE)
z Burst transfer: Defined as n beat transfers, where n will differ from one device family to another. For this device
family, n is 1. A burst transfer is atomic, and cannot be interrupted.
z Block transfer: The amount of data one transfer descriptor can transfer, and the amount can range from 1 to 64k
beats. In contrast to the burst transfer, a block transfer can be interrupted.
z Transaction: The DMAC can link several transfer descriptors by having the first descriptor pointing to the second
and so forth, as shown in Figure 19-2. A DMA transaction is defined as all block transfers within a linked list, being
completed.
A transfer descriptor describes how a block transfer should be carried out by the DMAC, and it must remain in SRAM. For
further details on the transfer descriptor refer to “Transfer Descriptors” on page 277.
Figure 19-2 shows several block transfers linked together, which are called linked descriptors. For further information
about linked descriptors, refer to “Linked Descriptors” on page 284.
A DMA transfer is initiated by an incoming transfer trigger on one of the DMA channels. This trigger can be configured to
be either a software trigger, an event trigger or one of the dedicated peripheral triggers. The transfer trigger will result in
a DMA transfer request from the specific channel to the arbiter, and if there are several DMA channels with pending
transfer requests, the arbiter has to choose which channel to grant access to become the active channel. The DMA
channel granted access as the active channel will carry out the transaction as configured in the transfer descriptor. The
DMA channel can be interrupted by a higher prioritized channel after each burst transfer, but will resume its block
transfer when it is granted access as the active channel again.
For each beat transfer an optional output event can be generated, and for each block transfer optional interrupts and an
optional output event can be generated. When a transaction is completed, dependent of the configuration, the DMA
channel will either be suspended or disabled.
19.6.1.2 CRC
The internal CRC supports two commonly used CRC polynomials; CRC-16 (CRC-CCITT) and CRC-32 (IEEE 802.3). It
can be used with selectable DMA channel or independently, with I/O interface.
DMA transaction
Block transfer
Link Enabled
Burst transfer
Link EnabledLink Enabled
Beat transfer