19.2 Overview
The Direct Memory Access Controller (DMAC) contains both a Direct Memory Access engine and a Cyclic Redundancy Check (CRC) engine. The DMAC can transfer data between memories and peripherals, offloading these tasks from the CPU. It enables high data-transfer rates with minimal CPU intervention and frees valuable CPU time. With access to all peripherals, the DMAC can automatically manage data transfers between communication peripherals.
The DMA engine of the DMAC includes several channels that can receive different types of transfer triggers and generate transfer requests to the arbiter. The arbiter selects one DMA channel at a time as the active channel. When a channel becomes active, the DMA fetch engine retrieves a transfer descriptor from SRAM and stores it in the active channel’s internal memory, after which the channel executes the data transfer. Refer to the Block Diagram section for a graphical overview of the DMAC.
An ongoing data transfer on an active channel can be interrupted by a higher priority DMA channel. The DMAC writes the updated transfer descriptor from the active channel’s internal memory back to SRAM, and then grants the higher priority channel permission to begin its transfer as the new active channel. Once a DMA channel completes its transfer, interrupts and events can optionally be generated.
The DMAC has the following bus interfaces:
- Data Transfer Bus — Used to perform the actual DMA transfers
- AHB/APB Bridge Bus — Used for reading and writing to the DMACn I/O registers
- Descriptor Fetch Bus — Used by the fetch engine to retrieve transfer descriptors before a data transfer can start or continue
- Write-back Bus — Used to write transfer descriptors back to SRAM
All buses are Advanced High-Performance Bus (AHB) host interfaces, except for the AHB/APB Bridge bus, which is an Advanced Peripheral Bus (APB) client interface.
The CRC engine can be used by software to detect accidental errors in transferred data and take corrective action, such as requesting retransmission of the data or discarding the incorrect data.
