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, thereby offloading these tasks from the CPU. It enables high data transfer rates with minimal CPU intervention, and frees up valueable CPU time. With access to all peripherals, the DMAC can automatically handle data transfers between communication peripherals.
The DMA engine of the DMAC has several channels that can receive different types of transfer triggers and generate transfer requests from the DMA channels to the arbiter. The arbiter selects one DMA channel at a time to act as the active channel. When an active channel is selected, the fetch engine of the DMA fetches a transfer descriptor from the SRAM and stores it in the internal memory of the active channel, which then executes the data transaction. 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 will write back the updated transfer descriptor from the internal memory of the active channel to SRAM, and grant the higher prioritized channel permission to start its transfer as the new active channel. Once a DMA channel completes its transfer, interrupts and events can optionally be generated.
The DMAC has four bus interfaces:
- Data Transfer Bus—Used for performing the actual DMA transfers
- AHB/APB Bridge Bus—Used for writing to and reading from the DMAC’s I/O registers
- Descriptor Fetch Bus—Used by the fetch engine to retrieve transfer descriptors before a data transfer can be started or continued
- Write-back Bus—Used to write the transfer descriptor 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 to take corrective action, such as requesting the data to be sent again or simply discarding the incorrect data.
