Using the STM32F1x and STM32L1x DMA controller

This application note describes how to use the STM32F1x and STM32L1x direct memory access (DMA) controller. The STM32F1x and STM32L1x DMA controller, the Cortex™-M3 core, the advanced microcontroller bus architecture (AMBA) bus and the memory system contribute to provide a high data bandwidth and to develop very-low latency response time software. This application note also describes how to take full advantage of these features and ensure correct response times for different peripherals and subsystems. The STM32F1x and STM32L1x will be referred to as STM32F1x/L1x, and the DMA controller as DMA throughout the document.


Using the STM32F1x and STM32L1x DMA controller - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
12
File format
PDF
File size
233 KB
Published
27 October, 2023
Updated
27 October, 2023
Models
STM32F1x, L1x
MD5 checksum
B9B86DB73ADF389C2A606200C05886C3

About this manual

This document describes the Direct Memory Access (DMA) controller for STM32F1x and STM32L1x microcontrollers. It details how the DMA controller utilizes the Cortex-M3 core and AMBA bus architecture to provide high data bandwidth and low latency response times. The note explains that the DMA allows data transfers to occur in the background without CPU intervention, enabling the processor to execute other tasks until a data block is ready.

What's inside

  • DMA controller description
  • Main features
  • Performance considerations
  • Round robin priority scheme
  • Multi-layer structure and bus stealing
  • DMA latency
  • Databus bandwidth limitation
  • DMA programming examples
  • ADC continuous data acquisition
  • GPIO fast data transfer

Specifications

Number of DMA channelsTwelve DMA channels (7 for DMA1 and 5 for DMA2)
Maximum data tokens per transfer65536 data tokens
Transfer modesNon-circular/circular mode
Transfer typesMemory-to-memory, memory-to-peripheral, peripheral-to-memory and peripheral-to-peripheral
Arbitration time (tA)2 AHB clock cycle
Peripheral access time (tACC)1 AHB clock cycle + 2 APB clock cycles + 1 AHB clock cycle

Frequently asked questions

What is the maximum data bandwidth requirement for the highest priority DMA channel?

The required data bandwidth must be lower than 25% of the maximum APB transfer rate.

How does the STM32 DMA handle bus access compared to burst mode?

The STM32 DMA uses a single bus cycle for data transfers (bus stealing) rather than operating in burst mode.

Can peripherals connected to the same DMA channel be used simultaneously?

No, peripherals connected to the same DMA channel cannot be used simultaneously when the DMA function is active.

Download PDF (233 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →