55
8331B–AVR–03/12
Atmel AVR XMEGA AU
Figure 5-1.
DMA Overview.
5.3
DMA Transaction
A complete DMA read and write operation between memories and/or peripherals is called a
DMA transaction. A transaction is done in data blocks, and the size of the transaction (number of
bytes to transfer) is selectable from software and controlled by the block size and repeat counter
settings. Each block transfer is divided into smaller bursts.
5.3.1
Block Transfer and Repeat
The size of the block transfer is set by the block transfer count register, and can be anything
from 1 byte to 64KB.
A repeat counter can be enabled to set a number of repeated block transfers before a transac-
tion is complete. The repeat is from 1 to 255, and an unlimited repeat count can be achieved by
setting the repeat count to zero.
5.3.2
Burst Transfer
Since the AVR CPU and DMA controller use the same data buses, a block transfer is divided
into smaller burst transfers. The burst transfer is selectable to 1, 2, 4, or 8 bytes. This means that
if the DMA acquires the data bus and a transfer request is pending, it will occupy the bus until all
bytes in the burst are transferred.
A bus arbiter controls when the DMA controller and the AVR CPU can use the bus. The CPU
always has priority, and so as long as the CPU requests access to the bus, any pending burst
transfer must wait. The CPU requests bus access when it executes an instruction that writes or
reads data to SRAM, I/O memory, EEPROM or the external bus interface. For more details on
memory access bus arbitration, refer to
R/W Master port
Arbitration
BUF
Bus
matrix
Arbiter
Read
Write
Slave port
Read /
Write
CTRL
DMA Channel 1
DMA Channel 2
DMA Channel 3
DMA trigger /
Event
DMA Channel 0
SRCADDR
TRFCNT
DESTADDR
TRIGSRC
REPCNT
Control Logic
Enable
Burst
CTRLA
CTRLB