Direct memory access controller (DMA)
RM0365
DocID025202 Rev 7
12
Direct memory access controller (DMA)
12.1 Introduction
Direct memory access (DMA) is used in order to provide high-speed data transfer between
peripherals and memory as well as memory to memory. Data can be quickly moved by DMA
without any CPU actions. This keeps CPU resources free for other operations.
The STM32F302xB/C/D/E devices have two DMA controllers with 12 channels in total, The
STM32F302x6/8 has 1 DMA controller with 7 channels. Each channel is dedicated to
managing memory access requests from one or more peripherals. Each has an arbiter for
handling the priority between DMA requests.
12.2
DMA main features
•
12 independently configurable channels (requests) on STM32F302xB/C/D/E and
STM32F302x6/8 devices and 7 independently configurable channels (requests) on
STM32F302x6/8 devices
•
Each channel is connected to dedicated hardware DMA requests, software trigger is
also supported on each channel. This configuration is done by software.
•
Priorities between requests from the DMA channels are software programmable (4
levels consisting of very high, high, medium, low) or hardware in case of equality
(request 1 has priority over request 2, etc.)
•
Independent source and destination transfer size (byte, half word, word), emulating
packing and unpacking. Source/destination addresses must be aligned on the data
size.
•
Support for circular buffer management
•
3 event flags (DMA Half Transfer, DMA Transfer complete and DMA Transfer Error)
logically ORed together in a single interrupt request for each channel
•
Memory-to-memory transfer
•
Peripheral-to-memory and memory-to-peripheral, and peripheral-to-peripheral
transfers
•
Access to Flash, SRAM, APB and AHB peripherals as source and destination
•
Programmable number of data to be transferred: up to 65535
12.3 DMA
implementation
This manual describes the full set of features implemented in DMA1. DMA2 supports a
smaller number of channels, but is otherwise identical to DMA1.
Table 33. DMA implementation
Feature
DMA1
DMA2
(1)
1. DMA2 is not available on STM32F302x6/8 devices.
Number of DMA channels
7
5