HAL DMA Overview ¶
Introducing DMA ¶
- group DMA_Introduction
-
In STM32 microcontrollers, the Direct Memory Access (DMA) controller enables data transfers between peripherals and memory or between memory regions. It supports multiple channels, programmable priority levels, and circular buffer management (circular mode). A transfer can be associated with a peripheral request.
Event generation and interrupt configuration are available per channel, based on various conditions.
Additional features can be activated, including triggered channels (where the trigger can be a peripheral event or a DMA channel event) and data-handling operations.
Support for privileged and unprivileged DMA transfers is available independently at the channel level.
For more information on linked list operations and queue management, refer to the Q Drivers.
Module and files ¶
The following diagram illustrates the DMA module and its associated files.
Component diagram ¶
The following diagram illustrates the software components involved in the DMA module. It shows the interactions between the user application, HAL drivers, low-level drivers, and the hardware components.
Configuration table ¶
The following table lists the configuration defines for the HAL DMA module, specifying their locations, default values, and descriptions:
- group DMA_Configuration_Table
-
Configuration inside the DMA driver ¶
Config defines
Description
Default value
Note
PRODUCT
from IDE
NA
The selected device (eg STM32C5XXxx)
USE_HAL_DMA_MODULE
from hal_conf.h
1
Allows to use HAL DMA module.
USE_ASSERT_DBG_PARAM
from IDE
None
Allows to use the assert check parameters.
USE_ASSERT_DBG_STATE
from IDE
None
Allows to use the assert check states.
USE_HAL_CHECK_PARAM
from hal_conf.h
0
Allows to use the run-time checks parameters.
USE_HAL_CHECK_PROCESS_STATE
from hal_conf.h
0
Allows to use the load and store exclusive.
USE_HAL_DMA_CLK_ENABLE_MODEL
from hal_conf.h
HAL_CLK_ENABLE_NO
Allows to use the clock interface management for DMA.
USE_HAL_DMA_GET_LAST_ERRORS
from hal_conf.h
0
Allows to use error code mechanism.
USE_HAL_DMA_USER_DATA
from hal_conf.h
0
Allows to use user data.
USE_HAL_DMA_LINKEDLIST
from hal_conf.h
0
Allows to use linked list services.