HAL DMA Functions ¶
Initialization and De-initialization functions ¶
- group DMA_Exported_Functions_Group1
-
This subsection provides a set of functions to initialize and de-initialize a DMA channel peripheral:
Call the function HAL_DMA_Init() to initialize the DMA channel handle and associate a physical channel instance. (As optional, DMA clock is enabled inside the function)
Call the function HAL_DMA_DeInit() to restore the physical and logical default configuration (after reset) of the selected DMA channel peripheral.
Functions
-
hal_status_t
HAL_DMA_Init
(
hal_dma_handle_t
*
hdma
,
hal_dma_channel_t
instance
)
¶
-
Initialize the DMA channel handle and associate physical channel instance.
- Parameters :
-
hdma – Pointer to DMA channel handle
instance – DMA channel instance
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter when hdma pointer is NULL
HAL_OK – DMA channel is successfully initialized
-
void
HAL_DMA_DeInit
(
hal_dma_handle_t
*
hdma
)
¶
-
Deinitialize the DMA channel handle and the associated physical channel instance.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
hal_dma_channel_t
HAL_DMA_GetInstance
(
const
hal_dma_handle_t
*
hdma
)
¶
-
Retrieve the HAL DMA channel instance.
- Parameters :
-
hdma – Pointer to DMA channel handle.
- Return values :
-
DMA – channel instance, element in hal_dma_channel_t enumeration.
-
DMA_Channel_TypeDef
*
HAL_DMA_GetLLInstance
(
const
hal_dma_handle_t
*
hdma
)
¶
-
Retrieve the LL DMA channel instance.
- Parameters :
-
hdma – Pointer to DMA channel handle.
- Return values :
-
DMA – channel instance.
- group DMA_Exported_Functions_Group1
-
This subsection provides a set of functions to initialize and de-initialize a DMA channel peripheral:
Call the function HAL_DMA_Init() to initialize the DMA channel handle and associate a physical channel instance. (As optional, DMA clock is enabled inside the function)
Call the function HAL_DMA_DeInit() to restore the physical and logical default configuration (after reset) of the selected DMA channel peripheral.
Functions
-
hal_status_t
HAL_DMA_Init
(
hal_dma_handle_t
*
hdma
,
hal_dma_channel_t
instance
)
-
Initialize the DMA channel handle and associate physical channel instance.
- Parameters :
-
hdma – Pointer to DMA channel handle
instance – DMA channel instance
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter when hdma pointer is NULL
HAL_OK – DMA channel is successfully initialized
-
void
HAL_DMA_DeInit
(
hal_dma_handle_t
*
hdma
)
-
Deinitialize the DMA channel handle and the associated physical channel instance.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
hal_dma_channel_t
HAL_DMA_GetInstance
(
const
hal_dma_handle_t
*
hdma
)
-
Retrieve the HAL DMA channel instance.
- Parameters :
-
hdma – Pointer to DMA channel handle.
- Return values :
-
DMA – channel instance, element in hal_dma_channel_t enumeration.
-
DMA_Channel_TypeDef
*
HAL_DMA_GetLLInstance
(
const
hal_dma_handle_t
*
hdma
)
-
Retrieve the LL DMA channel instance.
- Parameters :
-
hdma – Pointer to DMA channel handle.
- Return values :
-
DMA – channel instance.
- group DMA_Exported_Functions_Group1
-
This subsection provides a set of functions to initialize and de-initialize a DMA channel peripheral:
Call the function HAL_DMA_Init() to initialize the DMA channel handle and associate a physical channel instance. (As optional, DMA clock is enabled inside the function)
Call the function HAL_DMA_DeInit() to restore the physical and logical default configuration (after reset) of the selected DMA channel peripheral.
Functions
-
hal_status_t
HAL_DMA_Init
(
hal_dma_handle_t
*
hdma
,
hal_dma_channel_t
instance
)
-
Initialize the DMA channel handle and associate physical channel instance.
- Parameters :
-
hdma – Pointer to DMA channel handle
instance – DMA channel instance
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter when hdma pointer is NULL
HAL_OK – DMA channel is successfully initialized
-
void
HAL_DMA_DeInit
(
hal_dma_handle_t
*
hdma
)
-
Deinitialize the DMA channel handle and the associated physical channel instance.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
hal_dma_channel_t
HAL_DMA_GetInstance
(
const
hal_dma_handle_t
*
hdma
)
-
Retrieve the HAL DMA channel instance.
- Parameters :
-
hdma – Pointer to DMA channel handle.
- Return values :
-
DMA – channel instance, element in hal_dma_channel_t enumeration.
-
DMA_Channel_TypeDef
*
HAL_DMA_GetLLInstance
(
const
hal_dma_handle_t
*
hdma
)
-
Retrieve the LL DMA channel instance.
- Parameters :
-
hdma – Pointer to DMA channel handle.
- Return values :
-
DMA – channel instance.
Configuration functions ¶
- group DMA_Exported_Functions_Group2
-
This subsection provides a set of functions to configure the DMA channel peripheral:
Basic transfer configuration
Call the function HAL_DMA_SetConfigDirectXfer() to configure the DMA channel basic transfer according to configured parameter within hal_dma_direct_xfer_config_t structure
Call the function HAL_DMA_GetConfigDirectXfer() to get the current configured basic transfer
Hardware request mode transfer configuration
Call the function HAL_DMA_SetConfigDirectXferHardwareRequestMode() to configure the DMA channel transfer hardware request mode according to configured parameters
Call the function HAL_DMA_ResetConfigDirectXferHardwareRequestMode() to reset the DMA channel transfer hardware request mode configuration
Call the function HAL_DMA_GetConfigDirectXferHardwareRequestMode() to get the current configured transfer hardware request mode
Flow control mode configuration
Call the function HAL_DMA_SetConfigDirectXferFlowControlMode() to configure the DMA channel flow control mode
Call the function HAL_DMA_ResetConfigDirectXferFlowControlMode() to reset the DMA channel flow control mode
Call the function HAL_DMA_GetConfigDirectXferFlowControlMode() to get the current configured transfer flow control mode
Trigger transfer configuration
Call the function HAL_DMA_SetConfigDirectXferTrigger() to configure the DMA channel trigger according to configured parameter within hal_dma_trigger_config_t structure
Call the function HAL_DMA_ResetConfigDirectXferTrigger() to reset the DMA channel transfer trigger configuration
Call the function HAL_DMA_GetConfigDirectXferTrigger() to get the current configured trigger
Data handling transfer configuration
Call the function HAL_DMA_SetConfigDirectXferDataHandling() to configure the DMA channel data handling according to configured parameter within hal_dma_data_handling_config_t structure
Call the function HAL_DMA_ResetConfigDirectXferDataHandling() to reset the DMA channel transfer data handling configuration
Call the function HAL_DMA_GetConfigDirectXferDataHandling() to get the current configured data handling
Channel privilege attribute configuration
Call the function HAL_DMA_SetPrivAttr() to configure the DMA channel privileged access level attribute
Call the function HAL_DMA_GetPrivAttr() to get the DMA channel privileged access level attribute
Channel lock attributes configuration
Call the function HAL_DMA_LockAttr() to lock the DMA channel privileged access level attribute
Call the function HAL_DMA_IsLockedAttr() to check the DMA channel privileged access level attribute lock
Peripherals direct transfer configuration
Call the function HAL_DMA_SetConfigPeriphDirectXfer() to configure the DMA channel peripheral direct transfer according to configured parameter within hal_dma_direct_xfer_config_t structure:
Call the function HAL_DMA_GetConfigPeriphDirectXfer() to get the current configured direct transfer
Linked list transfer configuration
Call the function HAL_DMA_SetConfigLinkedListXfer() to configure the DMA channel linked list transfer according to configured parameter within hal_dma_linkedlist_xfer_config_t structure
Call the function HAL_DMA_GetConfigLinkedListXfer() to get the current configured linked list transfer
Event mode transfer configuration
Call the function HAL_DMA_SetLinkedListXferEventMode() to configure the DMA channel event mode according to selected parameter within hal_dma_linkedlist_xfer_event_mode_t enumeration
Call the function HAL_DMA_ResetLinkedListXferEventMode() to reset the DMA channel event mode configuration
Call the function HAL_DMA_GetLinkedListXferEventMode() to get the current configured event mode
Priority transfer configuration
Call the function HAL_DMA_SetLinkedListXferPriority() to configure the DMA channel priority according to selected parameter within hal_dma_priority_t enumeration
Call the function HAL_DMA_ResetLinkedListXferPriority() to reset the DMA channel priority configuration
Call the function HAL_DMA_GetLinkedListXferPriority() to get the current configured priority
Execution mode transfer configuration
Call the function HAL_DMA_SetLinkedListXferExecutionMode() to configure the DMA channel execution mode according to selected parameter within hal_dma_linkedlist_execution_mode_t enumeration
Call the function HAL_DMA_ResetLinkedListXferExecutionMode() to reset the DMA channel execution mode configuration
Call the function HAL_DMA_GetLinkedListXferExecutionMode() to get the current configured execution mode
Peripherals linked list circular transfer configuration
Call the function HAL_DMA_SetConfigPeriphLinkedListCircularXfer() to configure the DMA channel peripheral linked list circular transfer according to configured parameter within hal_dma_direct_xfer_config_t structure
Call the function HAL_DMA_GetConfigPeriphLinkedListCircularXfer() to get the current configured peripheral linked list circular transfer
Functions
-
hal_status_t
HAL_DMA_SetConfigDirectXfer
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_direct_xfer_config_t
*
p_config
)
¶
-
Set the DMA channel direct transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_config pointer is NULL
HAL_OK – Direct transfer is successfully configured
-
void
HAL_DMA_GetConfigDirectXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_direct_xfer_config_t
*
p_config
)
¶
-
Get the DMA channel direct transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
-
hal_status_t
HAL_DMA_SetConfigDirectXferHardwareRequestMode
(
hal_dma_handle_t
*
hdma
,
hal_dma_hardware_request_mode_t
hw_request_mode
)
¶
-
Set the DMA channel direct transfer hardware request mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
hw_request_mode – Element in hal_dma_hardware_request_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_OK – Request mode is successfully configured
-
hal_status_t
HAL_DMA_ResetConfigDirectXferHardwareRequestMode
(
hal_dma_handle_t
*
hdma
)
¶
-
Reset the DMA channel direct transfer hardware request mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_OK – Reset direct transfer request mode configuration is successful
-
hal_dma_hardware_request_mode_t
HAL_DMA_GetConfigDirectXferHardwareRequestMode
(
hal_dma_handle_t
*
hdma
)
¶
-
Get the DMA channel direct transfer hardware request mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
Returned – value can be one of the following values:
-
hal_status_t
HAL_DMA_SetConfigDirectXferFlowControlMode
(
hal_dma_handle_t
*
hdma
,
hal_dma_flow_control_mode_t
flow_control_mode
)
¶
-
Set the DMA channel direct transfer flow control mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
flow_control_mode – Element in hal_dma_flow_control_mode_t enumeration
- Return values :
-
HAL_OK – Direct transfer flow control mode is successfully configured
-
hal_status_t
HAL_DMA_ResetConfigDirectXferFlowControlMode
(
hal_dma_handle_t
*
hdma
)
¶
-
Reset the DMA channel direct transfer flow control mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_OK – Direct transfer flow control mode is successfully configured
-
hal_dma_flow_control_mode_t
HAL_DMA_GetConfigDirectXferFlowControlMode
(
hal_dma_handle_t
*
hdma
)
¶
-
Get the DMA channel direct transfer flow control mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
Returned – value can be one of the following values:
-
hal_status_t
HAL_DMA_SetConfigDirectXferTrigger
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_trigger_config_t
*
p_config
)
¶
-
Set the DMA channel direct transfer trigger configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_trigger_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct or p_config pointer is NULL
HAL_OK – Direct transfer trigger is successfully configured
-
hal_status_t
HAL_DMA_ResetConfigDirectXferTrigger
(
hal_dma_handle_t
*
hdma
)
¶
-
Reset the DMA channel direct transfer trigger configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_OK – Reset direct transfer trigger configuration is successful
-
void
HAL_DMA_GetConfigDirectXferTrigger
(
hal_dma_handle_t
*
hdma
,
hal_dma_trigger_config_t
*
p_config
)
¶
-
Get the DMA channel direct transfer trigger configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_trigger_config_t configuration structure
-
hal_status_t
HAL_DMA_SetConfigDirectXferDataHandling
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_data_handling_config_t
*
p_config
)
¶
-
Set the DMA channel direct transfer data handling configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_data_handling_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct or p_config pointer is NULL
HAL_OK – Direct transfer data handling is successfully configured
-
hal_status_t
HAL_DMA_ResetConfigDirectXferDataHandling
(
hal_dma_handle_t
*
hdma
)
¶
-
Reset the DMA channel direct transfer data handling configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_OK – Reset direct transfer data handling configuration is successful
-
void
HAL_DMA_GetConfigDirectXferDataHandling
(
hal_dma_handle_t
*
hdma
,
hal_dma_data_handling_config_t
*
p_config
)
¶
-
Get the DMA channel direct transfer data handling configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_data_handling_config_t configuration structure
-
hal_status_t
HAL_DMA_SetPrivAttr
(
hal_dma_channel_t
instance
,
hal_dma_priv_attr_t
priv_attr
)
¶
-
Set the DMA channel privileged access level attribute.
- Parameters :
-
instance – DMA channel instance
priv_attr – Element in hal_dma_priv_attr_t enumeration
- Return values :
-
HAL_ERROR – Operation failed, not in privileged execution mode.
HAL_OK – Privileged attribute set successfully.
-
hal_dma_priv_attr_t
HAL_DMA_GetPrivAttr
(
hal_dma_channel_t
instance
)
¶
-
Get the DMA channel privileged access attribute configuration.
- Parameters :
-
instance – DMA channel instance
- Return values :
-
Returned – value can be one of the following values:
-
hal_status_t
HAL_DMA_LockAttr
(
hal_dma_channel_t
instance
)
¶
-
Lock the privileged access levels attribute for item(s).
- Parameters :
-
instance – DMA channel instance
- Return values :
-
HAL_ERROR – Operation failed, not in privileged execution mode.
HAL_OK – Privilege attribute locked successfully
-
hal_dma_attr_lock_status_t
HAL_DMA_IsLockedAttr
(
hal_dma_channel_t
instance
)
¶
-
Check if the DMA channel privilege attribute is locked.
- Parameters :
-
instance – DMA channel instance
- Return values :
-
Privilege – attribute lock status, element in hal_dma_attr_lock_status_t enumeration
-
hal_status_t
HAL_DMA_SetConfigPeriphDirectXfer
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_direct_xfer_config_t
*
p_config
)
¶
-
Set the DMA channel peripheral direct transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_config pointer is NULL
HAL_OK – Peripheral direct transfer is successfully configured
-
void
HAL_DMA_GetConfigPeriphDirectXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_direct_xfer_config_t
*
p_config
)
¶
-
Get the DMA channel peripheral direct transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
-
hal_status_t
HAL_DMA_SetConfigLinkedListXfer
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_linkedlist_xfer_config_t
*
p_config
)
¶
-
Set the DMA channel linked list transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_linkedlist_xfer_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_config pointer is NULL
HAL_OK – Linked list transfer is successfully configured
-
void
HAL_DMA_GetConfigLinkedListXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_linkedlist_xfer_config_t
*
p_config
)
¶
-
Get the DMA channel linked list transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_linkedlist_xfer_config_t configuration structure
-
hal_status_t
HAL_DMA_SetLinkedListXferEventMode
(
hal_dma_handle_t
*
hdma
,
hal_dma_linkedlist_xfer_event_mode_t
xfer_event_mode
)
¶
-
Set the DMA channel linked list transfer event mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
xfer_event_mode – Element in hal_dma_linkedlist_xfer_event_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Linked list transfer event mode is successfully configured
-
hal_status_t
HAL_DMA_ResetLinkedListXferEventMode
(
hal_dma_handle_t
*
hdma
)
¶
-
Reset the DMA channel linked list transfer event mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Reset linked list transfer event mode configuration is successful
-
hal_dma_linkedlist_xfer_event_mode_t
HAL_DMA_GetLinkedListXferEventMode
(
hal_dma_handle_t
*
hdma
)
¶
-
Get the DMA channel linked list transfer event mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_DMA_LINKEDLIST_XFER_EVENT_BLOCK – Linked list transfer event block
HAL_DMA_LINKEDLIST_XFER_EVENT_REPEATED_BLOCK – Linked list transfer event repeated block
HAL_DMA_LINKEDLIST_XFER_EVENT_NODE – Linked list transfer event node
HAL_DMA_LINKEDLIST_XFER_EVENT_Q – Linked list transfer event Q
-
hal_status_t
HAL_DMA_SetLinkedListXferPriority
(
hal_dma_handle_t
*
hdma
,
hal_dma_priority_t
priority
)
¶
-
Set the DMA channel linked list transfer priority configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
priority – Element in hal_dma_priority_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Linked list transfer priority is successfully configured
-
hal_status_t
HAL_DMA_ResetLinkedListXferPriority
(
hal_dma_handle_t
*
hdma
)
¶
-
Reset the DMA channel linked list transfer priority configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Reset linked list transfer priority configuration is successful
-
hal_dma_priority_t
HAL_DMA_GetLinkedListXferPriority
(
hal_dma_handle_t
*
hdma
)
¶
-
Get the DMA channel linked list transfer priority configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_DMA_PRIORITY_LOW_WEIGHT_LOW – DMA channel priority low and weight low
HAL_DMA_PRIORITY_LOW_WEIGHT_MID – DMA channel priority low and weight mid
HAL_DMA_PRIORITY_LOW_WEIGHT_HIGH – DMA channel priority low and weight high
HAL_DMA_PRIORITY_HIGH – DMA channel priority high
-
hal_status_t
HAL_DMA_SetLinkedListXferExecutionMode
(
hal_dma_handle_t
*
hdma
,
hal_dma_linkedlist_execution_mode_t
exec_mode
)
¶
-
Set the DMA channel linked list transfer execution mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
exec_mode – Element in hal_dma_linkedlist_execution_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Linked list transfer execution mode is successfully configured
-
hal_status_t
HAL_DMA_ResetLinkedListXferExecutionMode
(
hal_dma_handle_t
*
hdma
)
¶
-
Reset the DMA channel linked list transfer execution mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Reset linked list transfer execution mode configuration is successful
-
hal_dma_linkedlist_execution_mode_t
HAL_DMA_GetLinkedListXferExecutionMode
(
hal_dma_handle_t
*
hdma
)
¶
-
Get the DMA channel linked list transfer execution mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_DMA_LINKEDLIST_EXECUTION_Q – DMA channel is executed for the full linked list
HAL_DMA_LINKEDLIST_NODE_EXECUTION – DMA channel is executed once for the current linked list
-
hal_status_t
HAL_DMA_SetConfigPeriphLinkedListCircularXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_node_t
*
p_node
,
const
hal_dma_direct_xfer_config_t
*
p_node_config
)
¶
-
Set the DMA channel peripheral linked list circular transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_node – Pointer to hal_dma_node_t structure
p_node_config – Pointer to hal_dma_direct_xfer_config_t structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when node or node_config pointer is NULL
HAL_OK – Peripheral linked list circular transfer is successfully configured
-
void
HAL_DMA_GetConfigPeriphLinkedListCircularXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_node_t
*
p_node
,
hal_dma_direct_xfer_config_t
*
p_node_config
)
¶
-
Get the DMA channel peripheral linked list circular transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_node – Pointer to hal_dma_node_t structure
p_node_config – Pointer to hal_dma_direct_xfer_config_t structure
- group DMA_Exported_Functions_Group2
-
This subsection provides a set of functions to configure the DMA channel peripheral:
Basic transfer configuration
Call the function HAL_DMA_SetConfigDirectXfer() to configure the DMA channel basic transfer according to configured parameter within hal_dma_direct_xfer_config_t structure
Call the function HAL_DMA_GetConfigDirectXfer() to get the current configured basic transfer
Hardware request mode transfer configuration
Call the function HAL_DMA_SetConfigDirectXferHardwareRequestMode() to configure the DMA channel transfer hardware request mode according to configured parameters
Call the function HAL_DMA_ResetConfigDirectXferHardwareRequestMode() to reset the DMA channel transfer hardware request mode configuration
Call the function HAL_DMA_GetConfigDirectXferHardwareRequestMode() to get the current configured transfer hardware request mode
Flow control mode configuration
Call the function HAL_DMA_SetConfigDirectXferFlowControlMode() to configure the DMA channel flow control mode
Call the function HAL_DMA_ResetConfigDirectXferFlowControlMode() to reset the DMA channel flow control mode
Call the function HAL_DMA_GetConfigDirectXferFlowControlMode() to get the current configured transfer flow control mode
Trigger transfer configuration
Call the function HAL_DMA_SetConfigDirectXferTrigger() to configure the DMA channel trigger according to configured parameter within hal_dma_trigger_config_t structure
Call the function HAL_DMA_ResetConfigDirectXferTrigger() to reset the DMA channel transfer trigger configuration
Call the function HAL_DMA_GetConfigDirectXferTrigger() to get the current configured trigger
Data handling transfer configuration
Call the function HAL_DMA_SetConfigDirectXferDataHandling() to configure the DMA channel data handling according to configured parameter within hal_dma_data_handling_config_t structure
Call the function HAL_DMA_ResetConfigDirectXferDataHandling() to reset the DMA channel transfer data handling configuration
Call the function HAL_DMA_GetConfigDirectXferDataHandling() to get the current configured data handling
Channel privilege attribute configuration
Call the function HAL_DMA_SetPrivAttr() to configure the DMA channel privileged access level attribute
Call the function HAL_DMA_GetPrivAttr() to get the DMA channel privileged access level attribute
Channel lock attributes configuration
Call the function HAL_DMA_LockAttr() to lock the DMA channel privileged access level attribute
Call the function HAL_DMA_IsLockedAttr() to check the DMA channel privileged access level attribute lock
Peripherals direct transfer configuration
Call the function HAL_DMA_SetConfigPeriphDirectXfer() to configure the DMA channel peripheral direct transfer according to configured parameter within hal_dma_direct_xfer_config_t structure:
Call the function HAL_DMA_GetConfigPeriphDirectXfer() to get the current configured direct transfer
Linked list transfer configuration
Call the function HAL_DMA_SetConfigLinkedListXfer() to configure the DMA channel linked list transfer according to configured parameter within hal_dma_linkedlist_xfer_config_t structure
Call the function HAL_DMA_GetConfigLinkedListXfer() to get the current configured linked list transfer
Event mode transfer configuration
Call the function HAL_DMA_SetLinkedListXferEventMode() to configure the DMA channel event mode according to selected parameter within hal_dma_linkedlist_xfer_event_mode_t enumeration
Call the function HAL_DMA_ResetLinkedListXferEventMode() to reset the DMA channel event mode configuration
Call the function HAL_DMA_GetLinkedListXferEventMode() to get the current configured event mode
Priority transfer configuration
Call the function HAL_DMA_SetLinkedListXferPriority() to configure the DMA channel priority according to selected parameter within hal_dma_priority_t enumeration
Call the function HAL_DMA_ResetLinkedListXferPriority() to reset the DMA channel priority configuration
Call the function HAL_DMA_GetLinkedListXferPriority() to get the current configured priority
Execution mode transfer configuration
Call the function HAL_DMA_SetLinkedListXferExecutionMode() to configure the DMA channel execution mode according to selected parameter within hal_dma_linkedlist_execution_mode_t enumeration
Call the function HAL_DMA_ResetLinkedListXferExecutionMode() to reset the DMA channel execution mode configuration
Call the function HAL_DMA_GetLinkedListXferExecutionMode() to get the current configured execution mode
Peripherals linked list circular transfer configuration
Call the function HAL_DMA_SetConfigPeriphLinkedListCircularXfer() to configure the DMA channel peripheral linked list circular transfer according to configured parameter within hal_dma_direct_xfer_config_t structure
Call the function HAL_DMA_GetConfigPeriphLinkedListCircularXfer() to get the current configured peripheral linked list circular transfer
Functions
-
hal_status_t
HAL_DMA_SetConfigDirectXfer
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_direct_xfer_config_t
*
p_config
)
-
Set the DMA channel direct transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_config pointer is NULL
HAL_OK – Direct transfer is successfully configured
-
void
HAL_DMA_GetConfigDirectXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_direct_xfer_config_t
*
p_config
)
-
Get the DMA channel direct transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
-
hal_status_t
HAL_DMA_SetConfigDirectXferHardwareRequestMode
(
hal_dma_handle_t
*
hdma
,
hal_dma_hardware_request_mode_t
hw_request_mode
)
-
Set the DMA channel direct transfer hardware request mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
hw_request_mode – Element in hal_dma_hardware_request_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_OK – Request mode is successfully configured
-
hal_status_t
HAL_DMA_ResetConfigDirectXferHardwareRequestMode
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer hardware request mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_OK – Reset direct transfer request mode configuration is successful
-
hal_dma_hardware_request_mode_t
HAL_DMA_GetConfigDirectXferHardwareRequestMode
(
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel direct transfer hardware request mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
Returned – value can be one of the following values:
-
hal_status_t
HAL_DMA_SetConfigDirectXferFlowControlMode
(
hal_dma_handle_t
*
hdma
,
hal_dma_flow_control_mode_t
flow_control_mode
)
-
Set the DMA channel direct transfer flow control mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
flow_control_mode – Element in hal_dma_flow_control_mode_t enumeration
- Return values :
-
HAL_OK – Direct transfer flow control mode is successfully configured
-
hal_status_t
HAL_DMA_ResetConfigDirectXferFlowControlMode
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer flow control mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_OK – Direct transfer flow control mode is successfully configured
-
hal_dma_flow_control_mode_t
HAL_DMA_GetConfigDirectXferFlowControlMode
(
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel direct transfer flow control mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
Returned – value can be one of the following values:
-
hal_status_t
HAL_DMA_SetConfigDirectXferTrigger
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_trigger_config_t
*
p_config
)
-
Set the DMA channel direct transfer trigger configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_trigger_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct or p_config pointer is NULL
HAL_OK – Direct transfer trigger is successfully configured
-
hal_status_t
HAL_DMA_ResetConfigDirectXferTrigger
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer trigger configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_OK – Reset direct transfer trigger configuration is successful
-
void
HAL_DMA_GetConfigDirectXferTrigger
(
hal_dma_handle_t
*
hdma
,
hal_dma_trigger_config_t
*
p_config
)
-
Get the DMA channel direct transfer trigger configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_trigger_config_t configuration structure
-
hal_status_t
HAL_DMA_SetConfigDirectXferDataHandling
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_data_handling_config_t
*
p_config
)
-
Set the DMA channel direct transfer data handling configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_data_handling_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct or p_config pointer is NULL
HAL_OK – Direct transfer data handling is successfully configured
-
hal_status_t
HAL_DMA_ResetConfigDirectXferDataHandling
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer data handling configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_OK – Reset direct transfer data handling configuration is successful
-
void
HAL_DMA_GetConfigDirectXferDataHandling
(
hal_dma_handle_t
*
hdma
,
hal_dma_data_handling_config_t
*
p_config
)
-
Get the DMA channel direct transfer data handling configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_data_handling_config_t configuration structure
-
hal_status_t
HAL_DMA_SetPrivAttr
(
hal_dma_channel_t
instance
,
hal_dma_priv_attr_t
priv_attr
)
-
Set the DMA channel privileged access level attribute.
- Parameters :
-
instance – DMA channel instance
priv_attr – Element in hal_dma_priv_attr_t enumeration
- Return values :
-
HAL_ERROR – Operation failed, not in privileged execution mode.
HAL_OK – Privileged attribute set successfully.
-
hal_dma_priv_attr_t
HAL_DMA_GetPrivAttr
(
hal_dma_channel_t
instance
)
-
Get the DMA channel privileged access attribute configuration.
- Parameters :
-
instance – DMA channel instance
- Return values :
-
Returned – value can be one of the following values:
-
hal_status_t
HAL_DMA_LockAttr
(
hal_dma_channel_t
instance
)
-
Lock the privileged access levels attribute for item(s).
- Parameters :
-
instance – DMA channel instance
- Return values :
-
HAL_ERROR – Operation failed, not in privileged execution mode.
HAL_OK – Privilege attribute locked successfully
-
hal_dma_attr_lock_status_t
HAL_DMA_IsLockedAttr
(
hal_dma_channel_t
instance
)
-
Check if the DMA channel privilege attribute is locked.
- Parameters :
-
instance – DMA channel instance
- Return values :
-
Privilege – attribute lock status, element in hal_dma_attr_lock_status_t enumeration
-
hal_status_t
HAL_DMA_SetConfigPeriphDirectXfer
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_direct_xfer_config_t
*
p_config
)
-
Set the DMA channel peripheral direct transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_config pointer is NULL
HAL_OK – Peripheral direct transfer is successfully configured
-
void
HAL_DMA_GetConfigPeriphDirectXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_direct_xfer_config_t
*
p_config
)
-
Get the DMA channel peripheral direct transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
-
hal_status_t
HAL_DMA_SetConfigLinkedListXfer
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_linkedlist_xfer_config_t
*
p_config
)
-
Set the DMA channel linked list transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_linkedlist_xfer_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_config pointer is NULL
HAL_OK – Linked list transfer is successfully configured
-
void
HAL_DMA_GetConfigLinkedListXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_linkedlist_xfer_config_t
*
p_config
)
-
Get the DMA channel linked list transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_linkedlist_xfer_config_t configuration structure
-
hal_status_t
HAL_DMA_SetLinkedListXferEventMode
(
hal_dma_handle_t
*
hdma
,
hal_dma_linkedlist_xfer_event_mode_t
xfer_event_mode
)
-
Set the DMA channel linked list transfer event mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
xfer_event_mode – Element in hal_dma_linkedlist_xfer_event_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Linked list transfer event mode is successfully configured
-
hal_status_t
HAL_DMA_ResetLinkedListXferEventMode
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel linked list transfer event mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Reset linked list transfer event mode configuration is successful
-
hal_dma_linkedlist_xfer_event_mode_t
HAL_DMA_GetLinkedListXferEventMode
(
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel linked list transfer event mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_DMA_LINKEDLIST_XFER_EVENT_BLOCK – Linked list transfer event block
HAL_DMA_LINKEDLIST_XFER_EVENT_REPEATED_BLOCK – Linked list transfer event repeated block
HAL_DMA_LINKEDLIST_XFER_EVENT_NODE – Linked list transfer event node
HAL_DMA_LINKEDLIST_XFER_EVENT_Q – Linked list transfer event Q
-
hal_status_t
HAL_DMA_SetLinkedListXferPriority
(
hal_dma_handle_t
*
hdma
,
hal_dma_priority_t
priority
)
-
Set the DMA channel linked list transfer priority configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
priority – Element in hal_dma_priority_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Linked list transfer priority is successfully configured
-
hal_status_t
HAL_DMA_ResetLinkedListXferPriority
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel linked list transfer priority configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Reset linked list transfer priority configuration is successful
-
hal_dma_priority_t
HAL_DMA_GetLinkedListXferPriority
(
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel linked list transfer priority configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_DMA_PRIORITY_LOW_WEIGHT_LOW – DMA channel priority low and weight low
HAL_DMA_PRIORITY_LOW_WEIGHT_MID – DMA channel priority low and weight mid
HAL_DMA_PRIORITY_LOW_WEIGHT_HIGH – DMA channel priority low and weight high
HAL_DMA_PRIORITY_HIGH – DMA channel priority high
-
hal_status_t
HAL_DMA_SetLinkedListXferExecutionMode
(
hal_dma_handle_t
*
hdma
,
hal_dma_linkedlist_execution_mode_t
exec_mode
)
-
Set the DMA channel linked list transfer execution mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
exec_mode – Element in hal_dma_linkedlist_execution_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Linked list transfer execution mode is successfully configured
-
hal_status_t
HAL_DMA_ResetLinkedListXferExecutionMode
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel linked list transfer execution mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Reset linked list transfer execution mode configuration is successful
-
hal_dma_linkedlist_execution_mode_t
HAL_DMA_GetLinkedListXferExecutionMode
(
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel linked list transfer execution mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_DMA_LINKEDLIST_EXECUTION_Q – DMA channel is executed for the full linked list
HAL_DMA_LINKEDLIST_NODE_EXECUTION – DMA channel is executed once for the current linked list
-
hal_status_t
HAL_DMA_SetConfigPeriphLinkedListCircularXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_node_t
*
p_node
,
const
hal_dma_direct_xfer_config_t
*
p_node_config
)
-
Set the DMA channel peripheral linked list circular transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_node – Pointer to hal_dma_node_t structure
p_node_config – Pointer to hal_dma_direct_xfer_config_t structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when node or node_config pointer is NULL
HAL_OK – Peripheral linked list circular transfer is successfully configured
-
void
HAL_DMA_GetConfigPeriphLinkedListCircularXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_node_t
*
p_node
,
hal_dma_direct_xfer_config_t
*
p_node_config
)
-
Get the DMA channel peripheral linked list circular transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_node – Pointer to hal_dma_node_t structure
p_node_config – Pointer to hal_dma_direct_xfer_config_t structure
- group DMA_Exported_Functions_Group2
-
This subsection provides a set of functions to configure the DMA channel peripheral:
Basic transfer configuration
Call the function HAL_DMA_SetConfigDirectXfer() to configure the DMA channel basic transfer according to configured parameter within hal_dma_direct_xfer_config_t structure
Call the function HAL_DMA_GetConfigDirectXfer() to get the current configured basic transfer
Hardware request mode transfer configuration
Call the function HAL_DMA_SetConfigDirectXferHardwareRequestMode() to configure the DMA channel transfer hardware request mode according to configured parameters
Call the function HAL_DMA_ResetConfigDirectXferHardwareRequestMode() to reset the DMA channel transfer hardware request mode configuration
Call the function HAL_DMA_GetConfigDirectXferHardwareRequestMode() to get the current configured transfer hardware request mode
Flow control mode configuration
Call the function HAL_DMA_SetConfigDirectXferFlowControlMode() to configure the DMA channel flow control mode
Call the function HAL_DMA_ResetConfigDirectXferFlowControlMode() to reset the DMA channel flow control mode
Call the function HAL_DMA_GetConfigDirectXferFlowControlMode() to get the current configured transfer flow control mode
Trigger transfer configuration
Call the function HAL_DMA_SetConfigDirectXferTrigger() to configure the DMA channel trigger according to configured parameter within hal_dma_trigger_config_t structure
Call the function HAL_DMA_ResetConfigDirectXferTrigger() to reset the DMA channel transfer trigger configuration
Call the function HAL_DMA_GetConfigDirectXferTrigger() to get the current configured trigger
Data handling transfer configuration
Call the function HAL_DMA_SetConfigDirectXferDataHandling() to configure the DMA channel data handling according to configured parameter within hal_dma_data_handling_config_t structure
Call the function HAL_DMA_ResetConfigDirectXferDataHandling() to reset the DMA channel transfer data handling configuration
Call the function HAL_DMA_GetConfigDirectXferDataHandling() to get the current configured data handling
Channel privilege attribute configuration
Call the function HAL_DMA_SetPrivAttr() to configure the DMA channel privileged access level attribute
Call the function HAL_DMA_GetPrivAttr() to get the DMA channel privileged access level attribute
Channel lock attributes configuration
Call the function HAL_DMA_LockAttr() to lock the DMA channel privileged access level attribute
Call the function HAL_DMA_IsLockedAttr() to check the DMA channel privileged access level attribute lock
Peripherals direct transfer configuration
Call the function HAL_DMA_SetConfigPeriphDirectXfer() to configure the DMA channel peripheral direct transfer according to configured parameter within hal_dma_direct_xfer_config_t structure:
Call the function HAL_DMA_GetConfigPeriphDirectXfer() to get the current configured direct transfer
Linked list transfer configuration
Call the function HAL_DMA_SetConfigLinkedListXfer() to configure the DMA channel linked list transfer according to configured parameter within hal_dma_linkedlist_xfer_config_t structure
Call the function HAL_DMA_GetConfigLinkedListXfer() to get the current configured linked list transfer
Event mode transfer configuration
Call the function HAL_DMA_SetLinkedListXferEventMode() to configure the DMA channel event mode according to selected parameter within hal_dma_linkedlist_xfer_event_mode_t enumeration
Call the function HAL_DMA_ResetLinkedListXferEventMode() to reset the DMA channel event mode configuration
Call the function HAL_DMA_GetLinkedListXferEventMode() to get the current configured event mode
Priority transfer configuration
Call the function HAL_DMA_SetLinkedListXferPriority() to configure the DMA channel priority according to selected parameter within hal_dma_priority_t enumeration
Call the function HAL_DMA_ResetLinkedListXferPriority() to reset the DMA channel priority configuration
Call the function HAL_DMA_GetLinkedListXferPriority() to get the current configured priority
Execution mode transfer configuration
Call the function HAL_DMA_SetLinkedListXferExecutionMode() to configure the DMA channel execution mode according to selected parameter within hal_dma_linkedlist_execution_mode_t enumeration
Call the function HAL_DMA_ResetLinkedListXferExecutionMode() to reset the DMA channel execution mode configuration
Call the function HAL_DMA_GetLinkedListXferExecutionMode() to get the current configured execution mode
Peripherals linked list circular transfer configuration
Call the function HAL_DMA_SetConfigPeriphLinkedListCircularXfer() to configure the DMA channel peripheral linked list circular transfer according to configured parameter within hal_dma_direct_xfer_config_t structure
Call the function HAL_DMA_GetConfigPeriphLinkedListCircularXfer() to get the current configured peripheral linked list circular transfer
Functions
-
hal_status_t
HAL_DMA_SetConfigDirectXfer
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_direct_xfer_config_t
*
p_config
)
-
Set the DMA channel direct transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_config pointer is NULL
HAL_OK – Direct transfer is successfully configured
-
void
HAL_DMA_GetConfigDirectXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_direct_xfer_config_t
*
p_config
)
-
Get the DMA channel direct transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
-
hal_status_t
HAL_DMA_SetConfigDirectXferHardwareRequestMode
(
hal_dma_handle_t
*
hdma
,
hal_dma_hardware_request_mode_t
hw_request_mode
)
-
Set the DMA channel direct transfer hardware request mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
hw_request_mode – Element in hal_dma_hardware_request_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_OK – Request mode is successfully configured
-
hal_status_t
HAL_DMA_ResetConfigDirectXferHardwareRequestMode
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer hardware request mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_OK – Reset direct transfer request mode configuration is successful
-
hal_dma_hardware_request_mode_t
HAL_DMA_GetConfigDirectXferHardwareRequestMode
(
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel direct transfer hardware request mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
Returned – value can be one of the following values:
-
hal_status_t
HAL_DMA_SetConfigDirectXferFlowControlMode
(
hal_dma_handle_t
*
hdma
,
hal_dma_flow_control_mode_t
flow_control_mode
)
-
Set the DMA channel direct transfer flow control mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
flow_control_mode – Element in hal_dma_flow_control_mode_t enumeration
- Return values :
-
HAL_OK – Direct transfer flow control mode is successfully configured
-
hal_status_t
HAL_DMA_ResetConfigDirectXferFlowControlMode
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer flow control mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_OK – Direct transfer flow control mode is successfully configured
-
hal_dma_flow_control_mode_t
HAL_DMA_GetConfigDirectXferFlowControlMode
(
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel direct transfer flow control mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
Returned – value can be one of the following values:
-
hal_status_t
HAL_DMA_SetConfigDirectXferTrigger
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_trigger_config_t
*
p_config
)
-
Set the DMA channel direct transfer trigger configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_trigger_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct or p_config pointer is NULL
HAL_OK – Direct transfer trigger is successfully configured
-
hal_status_t
HAL_DMA_ResetConfigDirectXferTrigger
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer trigger configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_OK – Reset direct transfer trigger configuration is successful
-
void
HAL_DMA_GetConfigDirectXferTrigger
(
hal_dma_handle_t
*
hdma
,
hal_dma_trigger_config_t
*
p_config
)
-
Get the DMA channel direct transfer trigger configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_trigger_config_t configuration structure
-
hal_status_t
HAL_DMA_SetConfigDirectXferDataHandling
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_data_handling_config_t
*
p_config
)
-
Set the DMA channel direct transfer data handling configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_data_handling_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct or p_config pointer is NULL
HAL_OK – Direct transfer data handling is successfully configured
-
hal_status_t
HAL_DMA_ResetConfigDirectXferDataHandling
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer data handling configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_OK – Reset direct transfer data handling configuration is successful
-
void
HAL_DMA_GetConfigDirectXferDataHandling
(
hal_dma_handle_t
*
hdma
,
hal_dma_data_handling_config_t
*
p_config
)
-
Get the DMA channel direct transfer data handling configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_data_handling_config_t configuration structure
-
hal_status_t
HAL_DMA_SetPrivAttr
(
hal_dma_channel_t
instance
,
hal_dma_priv_attr_t
priv_attr
)
-
Set the DMA channel privileged access level attribute.
- Parameters :
-
instance – DMA channel instance
priv_attr – Element in hal_dma_priv_attr_t enumeration
- Return values :
-
HAL_ERROR – Operation failed, not in privileged execution mode.
HAL_OK – Privileged attribute set successfully.
-
hal_dma_priv_attr_t
HAL_DMA_GetPrivAttr
(
hal_dma_channel_t
instance
)
-
Get the DMA channel privileged access attribute configuration.
- Parameters :
-
instance – DMA channel instance
- Return values :
-
Returned – value can be one of the following values:
-
hal_status_t
HAL_DMA_LockAttr
(
hal_dma_channel_t
instance
)
-
Lock the privileged access levels attribute for item(s).
- Parameters :
-
instance – DMA channel instance
- Return values :
-
HAL_ERROR – Operation failed, not in privileged execution mode.
HAL_OK – Privilege attribute locked successfully
-
hal_dma_attr_lock_status_t
HAL_DMA_IsLockedAttr
(
hal_dma_channel_t
instance
)
-
Check if the DMA channel privilege attribute is locked.
- Parameters :
-
instance – DMA channel instance
- Return values :
-
Privilege – attribute lock status, element in hal_dma_attr_lock_status_t enumeration
-
hal_status_t
HAL_DMA_SetConfigPeriphDirectXfer
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_direct_xfer_config_t
*
p_config
)
-
Set the DMA channel peripheral direct transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_config pointer is NULL
HAL_OK – Peripheral direct transfer is successfully configured
-
void
HAL_DMA_GetConfigPeriphDirectXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_direct_xfer_config_t
*
p_config
)
-
Get the DMA channel peripheral direct transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
-
hal_status_t
HAL_DMA_SetConfigLinkedListXfer
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_linkedlist_xfer_config_t
*
p_config
)
-
Set the DMA channel linked list transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_linkedlist_xfer_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_config pointer is NULL
HAL_OK – Linked list transfer is successfully configured
-
void
HAL_DMA_GetConfigLinkedListXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_linkedlist_xfer_config_t
*
p_config
)
-
Get the DMA channel linked list transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_config – Pointer to hal_dma_linkedlist_xfer_config_t configuration structure
-
hal_status_t
HAL_DMA_SetLinkedListXferEventMode
(
hal_dma_handle_t
*
hdma
,
hal_dma_linkedlist_xfer_event_mode_t
xfer_event_mode
)
-
Set the DMA channel linked list transfer event mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
xfer_event_mode – Element in hal_dma_linkedlist_xfer_event_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Linked list transfer event mode is successfully configured
-
hal_status_t
HAL_DMA_ResetLinkedListXferEventMode
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel linked list transfer event mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Reset linked list transfer event mode configuration is successful
-
hal_dma_linkedlist_xfer_event_mode_t
HAL_DMA_GetLinkedListXferEventMode
(
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel linked list transfer event mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_DMA_LINKEDLIST_XFER_EVENT_BLOCK – Linked list transfer event block
HAL_DMA_LINKEDLIST_XFER_EVENT_REPEATED_BLOCK – Linked list transfer event repeated block
HAL_DMA_LINKEDLIST_XFER_EVENT_NODE – Linked list transfer event node
HAL_DMA_LINKEDLIST_XFER_EVENT_Q – Linked list transfer event Q
-
hal_status_t
HAL_DMA_SetLinkedListXferPriority
(
hal_dma_handle_t
*
hdma
,
hal_dma_priority_t
priority
)
-
Set the DMA channel linked list transfer priority configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
priority – Element in hal_dma_priority_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Linked list transfer priority is successfully configured
-
hal_status_t
HAL_DMA_ResetLinkedListXferPriority
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel linked list transfer priority configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Reset linked list transfer priority configuration is successful
-
hal_dma_priority_t
HAL_DMA_GetLinkedListXferPriority
(
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel linked list transfer priority configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_DMA_PRIORITY_LOW_WEIGHT_LOW – DMA channel priority low and weight low
HAL_DMA_PRIORITY_LOW_WEIGHT_MID – DMA channel priority low and weight mid
HAL_DMA_PRIORITY_LOW_WEIGHT_HIGH – DMA channel priority low and weight high
HAL_DMA_PRIORITY_HIGH – DMA channel priority high
-
hal_status_t
HAL_DMA_SetLinkedListXferExecutionMode
(
hal_dma_handle_t
*
hdma
,
hal_dma_linkedlist_execution_mode_t
exec_mode
)
-
Set the DMA channel linked list transfer execution mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
exec_mode – Element in hal_dma_linkedlist_execution_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Linked list transfer execution mode is successfully configured
-
hal_status_t
HAL_DMA_ResetLinkedListXferExecutionMode
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel linked list transfer execution mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
HAL_OK – Reset linked list transfer execution mode configuration is successful
-
hal_dma_linkedlist_execution_mode_t
HAL_DMA_GetLinkedListXferExecutionMode
(
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel linked list transfer execution mode configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_DMA_LINKEDLIST_EXECUTION_Q – DMA channel is executed for the full linked list
HAL_DMA_LINKEDLIST_NODE_EXECUTION – DMA channel is executed once for the current linked list
-
hal_status_t
HAL_DMA_SetConfigPeriphLinkedListCircularXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_node_t
*
p_node
,
const
hal_dma_direct_xfer_config_t
*
p_node_config
)
-
Set the DMA channel peripheral linked list circular transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_node – Pointer to hal_dma_node_t structure
p_node_config – Pointer to hal_dma_direct_xfer_config_t structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when node or node_config pointer is NULL
HAL_OK – Peripheral linked list circular transfer is successfully configured
-
void
HAL_DMA_GetConfigPeriphLinkedListCircularXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_node_t
*
p_node
,
hal_dma_direct_xfer_config_t
*
p_node_config
)
-
Get the DMA channel peripheral linked list circular transfer configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_node – Pointer to hal_dma_node_t structure
p_node_config – Pointer to hal_dma_direct_xfer_config_t structure
Linked list node management functions ¶
- group DMA_Exported_Functions_Group3
-
This subsection provides a set of functions to configure the DMA channel peripheral:
Node configuration
Call the function HAL_DMA_FillNodeConfig() to fill the node according to configured parameter within hal_dma_node_config_t structure
Call the function HAL_DMA_GetNodeConfig() to get the current node configuration
Direct transfer node configuration
Call the function HAL_DMA_FillNodeDirectXfer() to fill the node direct transfer according to configured parameter within hal_dma_direct_xfer_config_t structure
Call the function HAL_DMA_GetNodeDirectXfer() to get the current node direct transfer configuration
Hardware request mode node configuration
Call the function HAL_DMA_FillNodeHardwareRequestMode() to fill the node hardware request mode according to selected request mode parameter
Call the function HAL_DMA_GetNodeHardwareRequestMode() to get the current node hardware request mode selection
Flow control mode node configuration
Call the function HAL_DMA_FillNodeFlowControlMode() to fill the node flow control mode according to selected flow control mode parameter
Call the function HAL_DMA_GetNodeFlowControlMode() to get the current node flow control mode selection
Transfer event mode node configuration
Call the function HAL_DMA_FillNodeXferEventMode() to fill the node transfer event mode according to selected transfer event mode parameter
Call the function HAL_DMA_GetNodeXferEventMode() to get the current node transfer event mode configuration
Trigger node configuration
Call the function HAL_DMA_FillNodeTrigger() to fill the node trigger according to configured trigger parameters
Call the function HAL_DMA_GetNodeTrigger() to get the current node trigger configuration
Data handling node configuration
Call the function HAL_DMA_FillNodeDataHandling() to fill the node data handling according to configured data handling parameters
Call the function HAL_DMA_GetNodeDataHandling() to get the current node data handling configuration
Data node configuration
Call the function HAL_DMA_FillNodeData() to fill the node data according to configured data parameters
Call the function HAL_DMA_GetNodeData() to get the current node data configuration
Conversion Q nodes
Call the function HAL_DMA_ConvertQNodesToDynamic() to Convert linked list queue associated to the handle to dynamic format
Call the function HAL_DMA_ConvertQNodesToStatic() to Convert linked list queue associated to the handle to static format
Functions
-
hal_status_t
HAL_DMA_FillNodeConfig
(
hal_dma_node_t
*
p_node
,
const
hal_dma_node_config_t
*
p_conf
,
hal_dma_node_type_t
node_type
)
¶
-
Fill node configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_conf – Pointer to hal_dma_node_config_t configuration structure
node_type – Element in hal_dma_node_type_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node or p_conf pointer is NULL
HAL_OK – Fill node is successfully configured
-
void
HAL_DMA_GetNodeConfig
(
const
hal_dma_node_t
*
p_node
,
hal_dma_node_config_t
*
p_conf
,
hal_dma_node_type_t
*
p_node_type
)
¶
-
Get the configuration of node.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_conf – Pointer to hal_dma_node_config_t configuration structure
p_node_type – Element in hal_dma_node_type_t enumeration
-
hal_status_t
HAL_DMA_FillNodeDirectXfer
(
hal_dma_node_t
*
p_node
,
const
hal_dma_direct_xfer_config_t
*
p_config
,
hal_dma_node_type_t
node_type
)
¶
-
Fill node direct transfer configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
node_type – Element in hal_dma_node_type_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node or p_config pointer is NULL
HAL_OK – Fill node direct transfer is successfully configured
-
void
HAL_DMA_GetNodeDirectXfer
(
const
hal_dma_node_t
*
p_node
,
hal_dma_direct_xfer_config_t
*
p_config
,
hal_dma_node_type_t
*
p_node_type
)
¶
-
Get the configuration of node direct transfer.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
p_node_type – Element in hal_dma_node_type_t enumeration
-
hal_status_t
HAL_DMA_FillNodeHardwareRequestMode
(
hal_dma_node_t
*
p_node
,
hal_dma_hardware_request_mode_t
hw_request_mode
)
¶
-
Fill node hardware request mode configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
hw_request_mode – Element in hal_dma_hardware_request_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
HAL_OK – Fill node hardware request mode is successfully configured
-
hal_dma_hardware_request_mode_t
HAL_DMA_GetNodeHardwareRequestMode
(
const
hal_dma_node_t
*
p_node
)
¶
-
Get the configuration of node hardware request mode.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
- Return values :
-
HAL_DMA_HARDWARE_REQUEST_BURST – DMA channel hardware request mode is burst
HAL_DMA_HARDWARE_REQUEST_BLOCK – DMA channel hardware request mode is block
-
hal_status_t
HAL_DMA_FillNodeFlowControlMode
(
hal_dma_node_t
*
p_node
,
hal_dma_flow_control_mode_t
flow_control_mode
)
¶
-
Fill node flow control mode configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
flow_control_mode – Element in hal_dma_flow_control_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
HAL_OK – Fill node flow control request is successfully configured
-
hal_dma_flow_control_mode_t
HAL_DMA_GetNodeFlowControlMode
(
const
hal_dma_node_t
*
p_node
)
¶
-
Get the configuration of node flow control mode .
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
- Return values :
-
HAL_DMA_FLOW_CONTROL_DMA – DMA request DMA channel flow control mode
HAL_DMA_FLOW_CONTROL_PERIPH – DMA request peripheral flow control mode
-
hal_status_t
HAL_DMA_FillNodeXferEventMode
(
hal_dma_node_t
*
p_node
,
hal_dma_linkedlist_xfer_event_mode_t
xfer_event_mode
)
¶
-
Fill node transfer event mode configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
xfer_event_mode – Element in hal_dma_linkedlist_xfer_event_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node is NULL
HAL_OK – Fill node transfer event mode is successfully configured
-
hal_dma_linkedlist_xfer_event_mode_t
HAL_DMA_GetNodeXferEventMode
(
const
hal_dma_node_t
*
p_node
)
¶
-
Get the configuration of node transfer event mode.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
- Return values :
-
HAL_DMA_LINKEDLIST_XFER_EVENT_BLOCK – DMA channel transfer event mode is at block level.
HAL_DMA_LINKEDLIST_XFER_EVENT_NODE – DMA channel transfer event mode is at each linked list item.
HAL_DMA_LINKEDLIST_XFER_EVENT_Q – DMA channel transfer event mode is at last linked list item.
-
hal_status_t
HAL_DMA_FillNodeTrigger
(
hal_dma_node_t
*
p_node
,
const
hal_dma_trigger_config_t
*
p_config
)
¶
-
Fill node trigger configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_trigger_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node or p_config pointer is NULL
HAL_OK – Fill node trigger is successfully configured
-
void
HAL_DMA_GetNodeTrigger
(
const
hal_dma_node_t
*
p_node
,
hal_dma_trigger_config_t
*
p_config
)
¶
-
Get the configuration of node trigger.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_trigger_config_t configuration structure
-
hal_status_t
HAL_DMA_FillNodeDataHandling
(
hal_dma_node_t
*
p_node
,
const
hal_dma_data_handling_config_t
*
p_config
)
¶
-
Fill node data handling configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_data_handling_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node or p_config pointer is NULL
HAL_OK – Fill node data handling is successfully configured
-
void
HAL_DMA_GetNodeDataHandling
(
const
hal_dma_node_t
*
p_node
,
hal_dma_data_handling_config_t
*
p_config
)
¶
-
Get the configuration of node data handling.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_data_handling_config_t configuration structure
-
hal_status_t
HAL_DMA_FillNodeData
(
hal_dma_node_t
*
p_node
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
)
¶
-
Fill node data configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
HAL_OK – Fill node data is successfully configured
-
void
HAL_DMA_GetNodeData
(
const
hal_dma_node_t
*
p_node
,
uint32_t
*
p_src_addr
,
uint32_t
*
p_dest_addr
,
uint32_t
*
p_size_byte
)
¶
-
Get the configuration of node data.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_src_addr – Source address
p_dest_addr – Destination address
p_size_byte – Size in byte
-
hal_status_t
HAL_DMA_ConvertQNodesToDynamic
(
hal_q_t
*
p_q
)
¶
-
Convert linked list queue associated to the handle to dynamic format.
- Parameters :
-
p_q – Pointer to hal_q_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL
HAL_OK – Q nodes to dynamic conversion is successfully configured
-
hal_status_t
HAL_DMA_ConvertQNodesToStatic
(
hal_q_t
*
p_q
)
¶
-
Convert linked list queue associated to the handle to static format.
- Parameters :
-
p_q – Pointer to hal_q_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL
HAL_OK – Q nodes to static conversion is successfully configured
- group DMA_Exported_Functions_Group3
-
This subsection provides a set of functions to configure the DMA channel peripheral:
Node configuration
Call the function HAL_DMA_FillNodeConfig() to fill the node according to configured parameter within hal_dma_node_config_t structure
Call the function HAL_DMA_GetNodeConfig() to get the current node configuration
Direct transfer node configuration
Call the function HAL_DMA_FillNodeDirectXfer() to fill the node direct transfer according to configured parameter within hal_dma_direct_xfer_config_t structure
Call the function HAL_DMA_GetNodeDirectXfer() to get the current node direct transfer configuration
Hardware request mode node configuration
Call the function HAL_DMA_FillNodeHardwareRequestMode() to fill the node hardware request mode according to selected request mode parameter
Call the function HAL_DMA_GetNodeHardwareRequestMode() to get the current node hardware request mode selection
Flow control mode node configuration
Call the function HAL_DMA_FillNodeFlowControlMode() to fill the node flow control mode according to selected flow control mode parameter
Call the function HAL_DMA_GetNodeFlowControlMode() to get the current node flow control mode selection
Transfer event mode node configuration
Call the function HAL_DMA_FillNodeXferEventMode() to fill the node transfer event mode according to selected transfer event mode parameter
Call the function HAL_DMA_GetNodeXferEventMode() to get the current node transfer event mode configuration
Trigger node configuration
Call the function HAL_DMA_FillNodeTrigger() to fill the node trigger according to configured trigger parameters
Call the function HAL_DMA_GetNodeTrigger() to get the current node trigger configuration
Data handling node configuration
Call the function HAL_DMA_FillNodeDataHandling() to fill the node data handling according to configured data handling parameters
Call the function HAL_DMA_GetNodeDataHandling() to get the current node data handling configuration
Data node configuration
Call the function HAL_DMA_FillNodeData() to fill the node data according to configured data parameters
Call the function HAL_DMA_GetNodeData() to get the current node data configuration
Conversion Q nodes
Call the function HAL_DMA_ConvertQNodesToDynamic() to Convert linked list queue associated to the handle to dynamic format
Call the function HAL_DMA_ConvertQNodesToStatic() to Convert linked list queue associated to the handle to static format
Functions
-
hal_status_t
HAL_DMA_FillNodeConfig
(
hal_dma_node_t
*
p_node
,
const
hal_dma_node_config_t
*
p_conf
,
hal_dma_node_type_t
node_type
)
-
Fill node configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_conf – Pointer to hal_dma_node_config_t configuration structure
node_type – Element in hal_dma_node_type_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node or p_conf pointer is NULL
HAL_OK – Fill node is successfully configured
-
void
HAL_DMA_GetNodeConfig
(
const
hal_dma_node_t
*
p_node
,
hal_dma_node_config_t
*
p_conf
,
hal_dma_node_type_t
*
p_node_type
)
-
Get the configuration of node.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_conf – Pointer to hal_dma_node_config_t configuration structure
p_node_type – Element in hal_dma_node_type_t enumeration
-
hal_status_t
HAL_DMA_FillNodeDirectXfer
(
hal_dma_node_t
*
p_node
,
const
hal_dma_direct_xfer_config_t
*
p_config
,
hal_dma_node_type_t
node_type
)
-
Fill node direct transfer configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
node_type – Element in hal_dma_node_type_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node or p_config pointer is NULL
HAL_OK – Fill node direct transfer is successfully configured
-
void
HAL_DMA_GetNodeDirectXfer
(
const
hal_dma_node_t
*
p_node
,
hal_dma_direct_xfer_config_t
*
p_config
,
hal_dma_node_type_t
*
p_node_type
)
-
Get the configuration of node direct transfer.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
p_node_type – Element in hal_dma_node_type_t enumeration
-
hal_status_t
HAL_DMA_FillNodeHardwareRequestMode
(
hal_dma_node_t
*
p_node
,
hal_dma_hardware_request_mode_t
hw_request_mode
)
-
Fill node hardware request mode configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
hw_request_mode – Element in hal_dma_hardware_request_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
HAL_OK – Fill node hardware request mode is successfully configured
-
hal_dma_hardware_request_mode_t
HAL_DMA_GetNodeHardwareRequestMode
(
const
hal_dma_node_t
*
p_node
)
-
Get the configuration of node hardware request mode.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
- Return values :
-
HAL_DMA_HARDWARE_REQUEST_BURST – DMA channel hardware request mode is burst
HAL_DMA_HARDWARE_REQUEST_BLOCK – DMA channel hardware request mode is block
-
hal_status_t
HAL_DMA_FillNodeFlowControlMode
(
hal_dma_node_t
*
p_node
,
hal_dma_flow_control_mode_t
flow_control_mode
)
-
Fill node flow control mode configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
flow_control_mode – Element in hal_dma_flow_control_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
HAL_OK – Fill node flow control request is successfully configured
-
hal_dma_flow_control_mode_t
HAL_DMA_GetNodeFlowControlMode
(
const
hal_dma_node_t
*
p_node
)
-
Get the configuration of node flow control mode .
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
- Return values :
-
HAL_DMA_FLOW_CONTROL_DMA – DMA request DMA channel flow control mode
HAL_DMA_FLOW_CONTROL_PERIPH – DMA request peripheral flow control mode
-
hal_status_t
HAL_DMA_FillNodeXferEventMode
(
hal_dma_node_t
*
p_node
,
hal_dma_linkedlist_xfer_event_mode_t
xfer_event_mode
)
-
Fill node transfer event mode configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
xfer_event_mode – Element in hal_dma_linkedlist_xfer_event_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node is NULL
HAL_OK – Fill node transfer event mode is successfully configured
-
hal_dma_linkedlist_xfer_event_mode_t
HAL_DMA_GetNodeXferEventMode
(
const
hal_dma_node_t
*
p_node
)
-
Get the configuration of node transfer event mode.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
- Return values :
-
HAL_DMA_LINKEDLIST_XFER_EVENT_BLOCK – DMA channel transfer event mode is at block level.
HAL_DMA_LINKEDLIST_XFER_EVENT_NODE – DMA channel transfer event mode is at each linked list item.
HAL_DMA_LINKEDLIST_XFER_EVENT_Q – DMA channel transfer event mode is at last linked list item.
-
hal_status_t
HAL_DMA_FillNodeTrigger
(
hal_dma_node_t
*
p_node
,
const
hal_dma_trigger_config_t
*
p_config
)
-
Fill node trigger configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_trigger_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node or p_config pointer is NULL
HAL_OK – Fill node trigger is successfully configured
-
void
HAL_DMA_GetNodeTrigger
(
const
hal_dma_node_t
*
p_node
,
hal_dma_trigger_config_t
*
p_config
)
-
Get the configuration of node trigger.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_trigger_config_t configuration structure
-
hal_status_t
HAL_DMA_FillNodeDataHandling
(
hal_dma_node_t
*
p_node
,
const
hal_dma_data_handling_config_t
*
p_config
)
-
Fill node data handling configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_data_handling_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node or p_config pointer is NULL
HAL_OK – Fill node data handling is successfully configured
-
void
HAL_DMA_GetNodeDataHandling
(
const
hal_dma_node_t
*
p_node
,
hal_dma_data_handling_config_t
*
p_config
)
-
Get the configuration of node data handling.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_data_handling_config_t configuration structure
-
hal_status_t
HAL_DMA_FillNodeData
(
hal_dma_node_t
*
p_node
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
)
-
Fill node data configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
HAL_OK – Fill node data is successfully configured
-
void
HAL_DMA_GetNodeData
(
const
hal_dma_node_t
*
p_node
,
uint32_t
*
p_src_addr
,
uint32_t
*
p_dest_addr
,
uint32_t
*
p_size_byte
)
-
Get the configuration of node data.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_src_addr – Source address
p_dest_addr – Destination address
p_size_byte – Size in byte
-
hal_status_t
HAL_DMA_ConvertQNodesToDynamic
(
hal_q_t
*
p_q
)
-
Convert linked list queue associated to the handle to dynamic format.
- Parameters :
-
p_q – Pointer to hal_q_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL
HAL_OK – Q nodes to dynamic conversion is successfully configured
-
hal_status_t
HAL_DMA_ConvertQNodesToStatic
(
hal_q_t
*
p_q
)
-
Convert linked list queue associated to the handle to static format.
- Parameters :
-
p_q – Pointer to hal_q_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL
HAL_OK – Q nodes to static conversion is successfully configured
- group DMA_Exported_Functions_Group3
-
This subsection provides a set of functions to configure the DMA channel peripheral:
Node configuration
Call the function HAL_DMA_FillNodeConfig() to fill the node according to configured parameter within hal_dma_node_config_t structure
Call the function HAL_DMA_GetNodeConfig() to get the current node configuration
Direct transfer node configuration
Call the function HAL_DMA_FillNodeDirectXfer() to fill the node direct transfer according to configured parameter within hal_dma_direct_xfer_config_t structure
Call the function HAL_DMA_GetNodeDirectXfer() to get the current node direct transfer configuration
Hardware request mode node configuration
Call the function HAL_DMA_FillNodeHardwareRequestMode() to fill the node hardware request mode according to selected request mode parameter
Call the function HAL_DMA_GetNodeHardwareRequestMode() to get the current node hardware request mode selection
Flow control mode node configuration
Call the function HAL_DMA_FillNodeFlowControlMode() to fill the node flow control mode according to selected flow control mode parameter
Call the function HAL_DMA_GetNodeFlowControlMode() to get the current node flow control mode selection
Transfer event mode node configuration
Call the function HAL_DMA_FillNodeXferEventMode() to fill the node transfer event mode according to selected transfer event mode parameter
Call the function HAL_DMA_GetNodeXferEventMode() to get the current node transfer event mode configuration
Trigger node configuration
Call the function HAL_DMA_FillNodeTrigger() to fill the node trigger according to configured trigger parameters
Call the function HAL_DMA_GetNodeTrigger() to get the current node trigger configuration
Data handling node configuration
Call the function HAL_DMA_FillNodeDataHandling() to fill the node data handling according to configured data handling parameters
Call the function HAL_DMA_GetNodeDataHandling() to get the current node data handling configuration
Data node configuration
Call the function HAL_DMA_FillNodeData() to fill the node data according to configured data parameters
Call the function HAL_DMA_GetNodeData() to get the current node data configuration
Conversion Q nodes
Call the function HAL_DMA_ConvertQNodesToDynamic() to Convert linked list queue associated to the handle to dynamic format
Call the function HAL_DMA_ConvertQNodesToStatic() to Convert linked list queue associated to the handle to static format
Functions
-
hal_status_t
HAL_DMA_FillNodeConfig
(
hal_dma_node_t
*
p_node
,
const
hal_dma_node_config_t
*
p_conf
,
hal_dma_node_type_t
node_type
)
-
Fill node configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_conf – Pointer to hal_dma_node_config_t configuration structure
node_type – Element in hal_dma_node_type_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node or p_conf pointer is NULL
HAL_OK – Fill node is successfully configured
-
void
HAL_DMA_GetNodeConfig
(
const
hal_dma_node_t
*
p_node
,
hal_dma_node_config_t
*
p_conf
,
hal_dma_node_type_t
*
p_node_type
)
-
Get the configuration of node.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_conf – Pointer to hal_dma_node_config_t configuration structure
p_node_type – Element in hal_dma_node_type_t enumeration
-
hal_status_t
HAL_DMA_FillNodeDirectXfer
(
hal_dma_node_t
*
p_node
,
const
hal_dma_direct_xfer_config_t
*
p_config
,
hal_dma_node_type_t
node_type
)
-
Fill node direct transfer configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
node_type – Element in hal_dma_node_type_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node or p_config pointer is NULL
HAL_OK – Fill node direct transfer is successfully configured
-
void
HAL_DMA_GetNodeDirectXfer
(
const
hal_dma_node_t
*
p_node
,
hal_dma_direct_xfer_config_t
*
p_config
,
hal_dma_node_type_t
*
p_node_type
)
-
Get the configuration of node direct transfer.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_direct_xfer_config_t configuration structure
p_node_type – Element in hal_dma_node_type_t enumeration
-
hal_status_t
HAL_DMA_FillNodeHardwareRequestMode
(
hal_dma_node_t
*
p_node
,
hal_dma_hardware_request_mode_t
hw_request_mode
)
-
Fill node hardware request mode configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
hw_request_mode – Element in hal_dma_hardware_request_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
HAL_OK – Fill node hardware request mode is successfully configured
-
hal_dma_hardware_request_mode_t
HAL_DMA_GetNodeHardwareRequestMode
(
const
hal_dma_node_t
*
p_node
)
-
Get the configuration of node hardware request mode.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
- Return values :
-
HAL_DMA_HARDWARE_REQUEST_BURST – DMA channel hardware request mode is burst
HAL_DMA_HARDWARE_REQUEST_BLOCK – DMA channel hardware request mode is block
-
hal_status_t
HAL_DMA_FillNodeFlowControlMode
(
hal_dma_node_t
*
p_node
,
hal_dma_flow_control_mode_t
flow_control_mode
)
-
Fill node flow control mode configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
flow_control_mode – Element in hal_dma_flow_control_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
HAL_OK – Fill node flow control request is successfully configured
-
hal_dma_flow_control_mode_t
HAL_DMA_GetNodeFlowControlMode
(
const
hal_dma_node_t
*
p_node
)
-
Get the configuration of node flow control mode .
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
- Return values :
-
HAL_DMA_FLOW_CONTROL_DMA – DMA request DMA channel flow control mode
HAL_DMA_FLOW_CONTROL_PERIPH – DMA request peripheral flow control mode
-
hal_status_t
HAL_DMA_FillNodeXferEventMode
(
hal_dma_node_t
*
p_node
,
hal_dma_linkedlist_xfer_event_mode_t
xfer_event_mode
)
-
Fill node transfer event mode configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
xfer_event_mode – Element in hal_dma_linkedlist_xfer_event_mode_t enumeration
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node is NULL
HAL_OK – Fill node transfer event mode is successfully configured
-
hal_dma_linkedlist_xfer_event_mode_t
HAL_DMA_GetNodeXferEventMode
(
const
hal_dma_node_t
*
p_node
)
-
Get the configuration of node transfer event mode.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
- Return values :
-
HAL_DMA_LINKEDLIST_XFER_EVENT_BLOCK – DMA channel transfer event mode is at block level.
HAL_DMA_LINKEDLIST_XFER_EVENT_NODE – DMA channel transfer event mode is at each linked list item.
HAL_DMA_LINKEDLIST_XFER_EVENT_Q – DMA channel transfer event mode is at last linked list item.
-
hal_status_t
HAL_DMA_FillNodeTrigger
(
hal_dma_node_t
*
p_node
,
const
hal_dma_trigger_config_t
*
p_config
)
-
Fill node trigger configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_trigger_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node or p_config pointer is NULL
HAL_OK – Fill node trigger is successfully configured
-
void
HAL_DMA_GetNodeTrigger
(
const
hal_dma_node_t
*
p_node
,
hal_dma_trigger_config_t
*
p_config
)
-
Get the configuration of node trigger.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_trigger_config_t configuration structure
-
hal_status_t
HAL_DMA_FillNodeDataHandling
(
hal_dma_node_t
*
p_node
,
const
hal_dma_data_handling_config_t
*
p_config
)
-
Fill node data handling configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_data_handling_config_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node or p_config pointer is NULL
HAL_OK – Fill node data handling is successfully configured
-
void
HAL_DMA_GetNodeDataHandling
(
const
hal_dma_node_t
*
p_node
,
hal_dma_data_handling_config_t
*
p_config
)
-
Get the configuration of node data handling.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_config – Pointer to hal_dma_data_handling_config_t configuration structure
-
hal_status_t
HAL_DMA_FillNodeData
(
hal_dma_node_t
*
p_node
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
)
-
Fill node data configuration.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
HAL_OK – Fill node data is successfully configured
-
void
HAL_DMA_GetNodeData
(
const
hal_dma_node_t
*
p_node
,
uint32_t
*
p_src_addr
,
uint32_t
*
p_dest_addr
,
uint32_t
*
p_size_byte
)
-
Get the configuration of node data.
- Parameters :
-
p_node – Pointer to hal_dma_node_t node structure
p_src_addr – Source address
p_dest_addr – Destination address
p_size_byte – Size in byte
-
hal_status_t
HAL_DMA_ConvertQNodesToDynamic
(
hal_q_t
*
p_q
)
-
Convert linked list queue associated to the handle to dynamic format.
- Parameters :
-
p_q – Pointer to hal_q_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL
HAL_OK – Q nodes to dynamic conversion is successfully configured
-
hal_status_t
HAL_DMA_ConvertQNodesToStatic
(
hal_q_t
*
p_q
)
-
Convert linked list queue associated to the handle to static format.
- Parameters :
-
p_q – Pointer to hal_q_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL
HAL_OK – Q nodes to static conversion is successfully configured
Process management functions ¶
- group DMA_Exported_Functions_Group4
-
This subsection provides a set of functions to configure the DMA channel peripheral:
Call the function HAL_DMA_StartDirectXfer() to start direct DMA channel transfer in silent mode
Call the function HAL_DMA_StartDirectXfer_IT() to start direct DMA channel transfer in interrupt mode with default optional interrupts configuration
Call the function HAL_DMA_StartDirectXfer_IT_Opt() to start direct DMA channel transfer in interrupt mode with customized optional interrupts configuration
Call the HAL_DMA_StartPeriphXfer_IT_Opt()
function to start the DMA channel peripheral transfer with filtering optional interrupts.
Note: This function is intended exclusively for internal use by HAL PPP drivers for transfers over DMA.
Call the function HAL_DMA_StartLinkedListXfer() to start linked list DMA channel transfer in silent mode
Call the function HAL_DMA_StartLinkedListXfer_IT() to start linked list DMA channel transfer in interrupt mode with default optional interrupts configuration
Call the function HAL_DMA_StartLinkedListXfer_IT_Opt() to start linked list DMA channel transfer in interrupt mode with customized optional interrupts configuration
Call the function HAL_DMA_Abort() to abort any ongoing DMA channel transfer in blocking mode
Call the function HAL_DMA_Abort_IT() to abort any ongoing DMA channel transfer in interrupt mode
Call the function HAL_DMA_Suspend() to suspend any ongoing DMA channel transfer in blocking mode
Call the function HAL_DMA_Suspend_IT() to suspend any ongoing DMA channel transfer in interrupt mode
Call the function HAL_DMA_Resume() to resume any suspended DMA channel transfer immediately.
Call the function HAL_DMA_PollForXfer() to poll on any finite DMA channel transfer level selected through hal_dma_xfer_level_t
Call the function HAL_DMA_IRQHandler() to handle any DMA channel interrupt. This API must be executed in handler mode
Functions
-
hal_status_t
HAL_DMA_StartDirectXfer
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
)
¶
-
Start the DMA channel direct transfer in silent mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Silent direct transfer is successfully started
-
hal_status_t
HAL_DMA_StartDirectXfer_IT
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
)
¶
-
Start the DMA channel direct transfer in interrupt mode with default optional interrupts configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Interrupt direct transfer is successfully started
-
hal_status_t
HAL_DMA_StartDirectXfer_IT_Opt
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
,
uint32_t
interrupts
)
¶
-
Start the DMA channel direct transfer in interrupt mode with customized optional interrupts configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
interrupts – DMA optional interrupts to be enabled. This parameter can be one of Optional interrupts group.
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Interrupt direct transfer is successfully started
-
hal_status_t
HAL_DMA_StartPeriphXfer_IT_Opt
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
,
uint32_t
interrupts
)
¶
-
Start the DMA channel peripheral transfer.
Note
This function is intended exclusively for internal use by HAL PPP drivers for transfers over DMA.
- Parameters :
-
hdma – Pointer to DMA channel handle
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
interrupts – DMA optional interrupts to be enabled. This parameter can be one of Optional interrupts group.
- Return values :
-
HAL_ERROR – Transfer mode parameter is linked list linear
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Peripheral transfer is successfully started
-
hal_status_t
HAL_DMA_StartLinkedListXfer
(
hal_dma_handle_t
*
hdma
,
const
hal_q_t
*
p_q
)
¶
-
Start the DMA channel linked list transfer in silent mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_q – Pointer to hal_q_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL or transfer mode parameter is direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Silent linked list transfer is successfully started
-
hal_status_t
HAL_DMA_StartLinkedListXfer_IT
(
hal_dma_handle_t
*
hdma
,
const
hal_q_t
*
p_q
)
¶
-
Start the DMA channel linked list transfer in interrupt mode with default optional interrupts configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_q – Pointer to hal_q_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL or transfer mode parameter is direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Interrupt linked list transfer is successfully started
-
hal_status_t
HAL_DMA_StartLinkedListXfer_IT_Opt
(
hal_dma_handle_t
*
hdma
,
const
hal_q_t
*
p_q
,
uint32_t
interrupts
)
¶
-
Start the DMA channel linked list transfer in interrupt mode with customized optional interrupts configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_q – Pointer to hal_q_t configuration structure
interrupts – DMA optional interrupts to be enabled. This parameter can be one of Optional interrupts group.
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL or transfer mode parameter is direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Interrupt linked list transfer is successfully started
-
hal_status_t
HAL_DMA_Abort
(
hal_dma_handle_t
*
hdma
)
¶
-
Abort any ongoing DMA channel transfer in blocking mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_ERROR – DMA channel not aborted
HAL_OK – Transfer in blocking mode is successfully aborted
-
hal_status_t
HAL_DMA_Abort_IT
(
hal_dma_handle_t
*
hdma
)
¶
-
Abort any ongoing DMA channel transfer in interrupt mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_ERROR – DMA channel not aborted
HAL_OK – Transfer in interrupt mode is successfully aborted
-
hal_status_t
HAL_DMA_Suspend
(
hal_dma_handle_t
*
hdma
)
¶
-
Suspend any ongoing DMA channel transfer in blocking mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_ERROR – DMA channel not suspended
HAL_OK – Transfer in blocking mode is successfully suspended
-
hal_status_t
HAL_DMA_Suspend_IT
(
hal_dma_handle_t
*
hdma
)
¶
-
Suspend any ongoing DMA channel transfer in interrupt mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_ERROR – DMA channel not suspended
HAL_OK – Transfer in interrupt mode is successfully suspended
-
hal_status_t
HAL_DMA_Resume
(
hal_dma_handle_t
*
hdma
)
¶
-
Resume any suspended DMA channel transfer immediately.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Transfer is successfully resumed
-
hal_status_t
HAL_DMA_PollForXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_xfer_level_t
xfer_level
,
uint32_t
timeout_ms
)
¶
-
Polling for transfer status for finite DMA channel silent transfers.
- Parameters :
-
hdma – Pointer to DMA channel handle
xfer_level – DMA channel transfer level
timeout_ms – User timeout in milliseconds
- Return values :
-
HAL_TIMEOUT – User timeout
HAL_ERROR – DMA channel error
HAL_OK – Polling for transfer is successfully configured
-
void
HAL_DMA_IRQHandler
(
hal_dma_handle_t
*
hdma
)
¶
-
Handle any DMA channel interrupt.
- Parameters :
-
hdma – Pointer to DMA channel handle
- group DMA_Exported_Functions_Group4
-
This subsection provides a set of functions to configure the DMA channel peripheral:
Call the function HAL_DMA_StartDirectXfer() to start direct DMA channel transfer in silent mode
Call the function HAL_DMA_StartDirectXfer_IT() to start direct DMA channel transfer in interrupt mode with default optional interrupts configuration
Call the function HAL_DMA_StartDirectXfer_IT_Opt() to start direct DMA channel transfer in interrupt mode with customized optional interrupts configuration
Call the HAL_DMA_StartPeriphXfer_IT_Opt()
function to start the DMA channel peripheral transfer with filtering optional interrupts.
Note: This function is intended exclusively for internal use by HAL PPP drivers for transfers over DMA.
Call the function HAL_DMA_StartLinkedListXfer() to start linked list DMA channel transfer in silent mode
Call the function HAL_DMA_StartLinkedListXfer_IT() to start linked list DMA channel transfer in interrupt mode with default optional interrupts configuration
Call the function HAL_DMA_StartLinkedListXfer_IT_Opt() to start linked list DMA channel transfer in interrupt mode with customized optional interrupts configuration
Call the function HAL_DMA_Abort() to abort any ongoing DMA channel transfer in blocking mode
Call the function HAL_DMA_Abort_IT() to abort any ongoing DMA channel transfer in interrupt mode
Call the function HAL_DMA_Suspend() to suspend any ongoing DMA channel transfer in blocking mode
Call the function HAL_DMA_Suspend_IT() to suspend any ongoing DMA channel transfer in interrupt mode
Call the function HAL_DMA_Resume() to resume any suspended DMA channel transfer immediately.
Call the function HAL_DMA_PollForXfer() to poll on any finite DMA channel transfer level selected through hal_dma_xfer_level_t
Call the function HAL_DMA_IRQHandler() to handle any DMA channel interrupt. This API must be executed in handler mode
Functions
-
hal_status_t
HAL_DMA_StartDirectXfer
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
)
-
Start the DMA channel direct transfer in silent mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Silent direct transfer is successfully started
-
hal_status_t
HAL_DMA_StartDirectXfer_IT
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
)
-
Start the DMA channel direct transfer in interrupt mode with default optional interrupts configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Interrupt direct transfer is successfully started
-
hal_status_t
HAL_DMA_StartDirectXfer_IT_Opt
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
,
uint32_t
interrupts
)
-
Start the DMA channel direct transfer in interrupt mode with customized optional interrupts configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
interrupts – DMA optional interrupts to be enabled. This parameter can be one of Optional interrupts group.
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Interrupt direct transfer is successfully started
-
hal_status_t
HAL_DMA_StartPeriphXfer_IT_Opt
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
,
uint32_t
interrupts
)
-
Start the DMA channel peripheral transfer.
Note
This function is intended exclusively for internal use by HAL PPP drivers for transfers over DMA.
- Parameters :
-
hdma – Pointer to DMA channel handle
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
interrupts – DMA optional interrupts to be enabled. This parameter can be one of Optional interrupts group.
- Return values :
-
HAL_ERROR – Transfer mode parameter is linked list linear
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Peripheral transfer is successfully started
-
hal_status_t
HAL_DMA_StartLinkedListXfer
(
hal_dma_handle_t
*
hdma
,
const
hal_q_t
*
p_q
)
-
Start the DMA channel linked list transfer in silent mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_q – Pointer to hal_q_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL or transfer mode parameter is direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Silent linked list transfer is successfully started
-
hal_status_t
HAL_DMA_StartLinkedListXfer_IT
(
hal_dma_handle_t
*
hdma
,
const
hal_q_t
*
p_q
)
-
Start the DMA channel linked list transfer in interrupt mode with default optional interrupts configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_q – Pointer to hal_q_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL or transfer mode parameter is direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Interrupt linked list transfer is successfully started
-
hal_status_t
HAL_DMA_StartLinkedListXfer_IT_Opt
(
hal_dma_handle_t
*
hdma
,
const
hal_q_t
*
p_q
,
uint32_t
interrupts
)
-
Start the DMA channel linked list transfer in interrupt mode with customized optional interrupts configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_q – Pointer to hal_q_t configuration structure
interrupts – DMA optional interrupts to be enabled. This parameter can be one of Optional interrupts group.
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL or transfer mode parameter is direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Interrupt linked list transfer is successfully started
-
hal_status_t
HAL_DMA_Abort
(
hal_dma_handle_t
*
hdma
)
-
Abort any ongoing DMA channel transfer in blocking mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_ERROR – DMA channel not aborted
HAL_OK – Transfer in blocking mode is successfully aborted
-
hal_status_t
HAL_DMA_Abort_IT
(
hal_dma_handle_t
*
hdma
)
-
Abort any ongoing DMA channel transfer in interrupt mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_ERROR – DMA channel not aborted
HAL_OK – Transfer in interrupt mode is successfully aborted
-
hal_status_t
HAL_DMA_Suspend
(
hal_dma_handle_t
*
hdma
)
-
Suspend any ongoing DMA channel transfer in blocking mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_ERROR – DMA channel not suspended
HAL_OK – Transfer in blocking mode is successfully suspended
-
hal_status_t
HAL_DMA_Suspend_IT
(
hal_dma_handle_t
*
hdma
)
-
Suspend any ongoing DMA channel transfer in interrupt mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_ERROR – DMA channel not suspended
HAL_OK – Transfer in interrupt mode is successfully suspended
-
hal_status_t
HAL_DMA_Resume
(
hal_dma_handle_t
*
hdma
)
-
Resume any suspended DMA channel transfer immediately.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Transfer is successfully resumed
-
hal_status_t
HAL_DMA_PollForXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_xfer_level_t
xfer_level
,
uint32_t
timeout_ms
)
-
Polling for transfer status for finite DMA channel silent transfers.
- Parameters :
-
hdma – Pointer to DMA channel handle
xfer_level – DMA channel transfer level
timeout_ms – User timeout in milliseconds
- Return values :
-
HAL_TIMEOUT – User timeout
HAL_ERROR – DMA channel error
HAL_OK – Polling for transfer is successfully configured
-
void
HAL_DMA_IRQHandler
(
hal_dma_handle_t
*
hdma
)
-
Handle any DMA channel interrupt.
- Parameters :
-
hdma – Pointer to DMA channel handle
- group DMA_Exported_Functions_Group4
-
This subsection provides a set of functions to configure the DMA channel peripheral:
Call the function HAL_DMA_StartDirectXfer() to start direct DMA channel transfer in silent mode
Call the function HAL_DMA_StartDirectXfer_IT() to start direct DMA channel transfer in interrupt mode with default optional interrupts configuration
Call the function HAL_DMA_StartDirectXfer_IT_Opt() to start direct DMA channel transfer in interrupt mode with customized optional interrupts configuration
Call the HAL_DMA_StartPeriphXfer_IT_Opt()
function to start the DMA channel peripheral transfer with filtering optional interrupts.
Note: This function is intended exclusively for internal use by HAL PPP drivers for transfers over DMA.
Call the function HAL_DMA_StartLinkedListXfer() to start linked list DMA channel transfer in silent mode
Call the function HAL_DMA_StartLinkedListXfer_IT() to start linked list DMA channel transfer in interrupt mode with default optional interrupts configuration
Call the function HAL_DMA_StartLinkedListXfer_IT_Opt() to start linked list DMA channel transfer in interrupt mode with customized optional interrupts configuration
Call the function HAL_DMA_Abort() to abort any ongoing DMA channel transfer in blocking mode
Call the function HAL_DMA_Abort_IT() to abort any ongoing DMA channel transfer in interrupt mode
Call the function HAL_DMA_Suspend() to suspend any ongoing DMA channel transfer in blocking mode
Call the function HAL_DMA_Suspend_IT() to suspend any ongoing DMA channel transfer in interrupt mode
Call the function HAL_DMA_Resume() to resume any suspended DMA channel transfer immediately.
Call the function HAL_DMA_PollForXfer() to poll on any finite DMA channel transfer level selected through hal_dma_xfer_level_t
Call the function HAL_DMA_IRQHandler() to handle any DMA channel interrupt. This API must be executed in handler mode
Functions
-
hal_status_t
HAL_DMA_StartDirectXfer
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
)
-
Start the DMA channel direct transfer in silent mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Silent direct transfer is successfully started
-
hal_status_t
HAL_DMA_StartDirectXfer_IT
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
)
-
Start the DMA channel direct transfer in interrupt mode with default optional interrupts configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Interrupt direct transfer is successfully started
-
hal_status_t
HAL_DMA_StartDirectXfer_IT_Opt
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
,
uint32_t
interrupts
)
-
Start the DMA channel direct transfer in interrupt mode with customized optional interrupts configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
interrupts – DMA optional interrupts to be enabled. This parameter can be one of Optional interrupts group.
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Interrupt direct transfer is successfully started
-
hal_status_t
HAL_DMA_StartPeriphXfer_IT_Opt
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_addr
,
uint32_t
dest_addr
,
uint32_t
size_byte
,
uint32_t
interrupts
)
-
Start the DMA channel peripheral transfer.
Note
This function is intended exclusively for internal use by HAL PPP drivers for transfers over DMA.
- Parameters :
-
hdma – Pointer to DMA channel handle
src_addr – Source address
dest_addr – Destination address
size_byte – Size in byte
interrupts – DMA optional interrupts to be enabled. This parameter can be one of Optional interrupts group.
- Return values :
-
HAL_ERROR – Transfer mode parameter is linked list linear
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Peripheral transfer is successfully started
-
hal_status_t
HAL_DMA_StartLinkedListXfer
(
hal_dma_handle_t
*
hdma
,
const
hal_q_t
*
p_q
)
-
Start the DMA channel linked list transfer in silent mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_q – Pointer to hal_q_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL or transfer mode parameter is direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Silent linked list transfer is successfully started
-
hal_status_t
HAL_DMA_StartLinkedListXfer_IT
(
hal_dma_handle_t
*
hdma
,
const
hal_q_t
*
p_q
)
-
Start the DMA channel linked list transfer in interrupt mode with default optional interrupts configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_q – Pointer to hal_q_t configuration structure
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL or transfer mode parameter is direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Interrupt linked list transfer is successfully started
-
hal_status_t
HAL_DMA_StartLinkedListXfer_IT_Opt
(
hal_dma_handle_t
*
hdma
,
const
hal_q_t
*
p_q
,
uint32_t
interrupts
)
-
Start the DMA channel linked list transfer in interrupt mode with customized optional interrupts configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_q – Pointer to hal_q_t configuration structure
interrupts – DMA optional interrupts to be enabled. This parameter can be one of Optional interrupts group.
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when p_q pointer is NULL or transfer mode parameter is direct
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Interrupt linked list transfer is successfully started
-
hal_status_t
HAL_DMA_Abort
(
hal_dma_handle_t
*
hdma
)
-
Abort any ongoing DMA channel transfer in blocking mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_ERROR – DMA channel not aborted
HAL_OK – Transfer in blocking mode is successfully aborted
-
hal_status_t
HAL_DMA_Abort_IT
(
hal_dma_handle_t
*
hdma
)
-
Abort any ongoing DMA channel transfer in interrupt mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_ERROR – DMA channel not aborted
HAL_OK – Transfer in interrupt mode is successfully aborted
-
hal_status_t
HAL_DMA_Suspend
(
hal_dma_handle_t
*
hdma
)
-
Suspend any ongoing DMA channel transfer in blocking mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_ERROR – DMA channel not suspended
HAL_OK – Transfer in blocking mode is successfully suspended
-
hal_status_t
HAL_DMA_Suspend_IT
(
hal_dma_handle_t
*
hdma
)
-
Suspend any ongoing DMA channel transfer in interrupt mode.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_ERROR – DMA channel not suspended
HAL_OK – Transfer in interrupt mode is successfully suspended
-
hal_status_t
HAL_DMA_Resume
(
hal_dma_handle_t
*
hdma
)
-
Resume any suspended DMA channel transfer immediately.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
HAL_BUSY – DMA channel state is active when calling this API
HAL_OK – Transfer is successfully resumed
-
hal_status_t
HAL_DMA_PollForXfer
(
hal_dma_handle_t
*
hdma
,
hal_dma_xfer_level_t
xfer_level
,
uint32_t
timeout_ms
)
-
Polling for transfer status for finite DMA channel silent transfers.
- Parameters :
-
hdma – Pointer to DMA channel handle
xfer_level – DMA channel transfer level
timeout_ms – User timeout in milliseconds
- Return values :
-
HAL_TIMEOUT – User timeout
HAL_ERROR – DMA channel error
HAL_OK – Polling for transfer is successfully configured
-
void
HAL_DMA_IRQHandler
(
hal_dma_handle_t
*
hdma
)
-
Handle any DMA channel interrupt.
- Parameters :
-
hdma – Pointer to DMA channel handle
Callbacks functions ¶
- group DMA_Exported_Functions_Group5
-
This subsection provides a set of functions to register the DMA channel process and error callbacks:
Call the function HAL_DMA_RegisterXferHalfCpltCallback() to register the DMA channel half transfer complete callback
Call the function HAL_DMA_RegisterXferCpltCallback() to register the DMA channel transfer complete callback
Call the function HAL_DMA_RegisterXferAbortCallback() to register the DMA channel abort callback
Call the function HAL_DMA_RegisterXferSuspendCallback() to register the DMA channel suspend callback
Call the function HAL_DMA_RegisterXferErrorCallback() to register the DMA channel error callback
Call the function HAL_DMA_SetUserData() to set a user data in handle
Call the function HAL_DMA_GetUserData() to get a user data from handle
Functions
-
hal_status_t
HAL_DMA_RegisterXferHalfCpltCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
¶
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Half transfer complete callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel half transfer complete callback is successfully stored
-
hal_status_t
HAL_DMA_RegisterXferCpltCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
¶
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Transfer complete callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel transfer complete callback is successfully stored
-
hal_status_t
HAL_DMA_RegisterXferAbortCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
¶
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Abort callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel abort transfer callback is successfully stored
-
hal_status_t
HAL_DMA_RegisterXferSuspendCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
¶
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Suspend callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel suspend transfer callback is successfully stored
-
hal_status_t
HAL_DMA_RegisterXferErrorCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
¶
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Error callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel error transfer callback is successfully stored
-
void
HAL_DMA_XferHalfCpltCallback
(
hal_dma_handle_t
*
hdma
)
¶
-
DMA channel half transfer complete default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_XferCpltCallback
(
hal_dma_handle_t
*
hdma
)
¶
-
DMA channel transfer complete default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_XferAbortCallback
(
hal_dma_handle_t
*
hdma
)
¶
-
DMA channel abort default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_XferSuspendCallback
(
hal_dma_handle_t
*
hdma
)
¶
-
DMA channel suspend default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_XferErrorCallback
(
hal_dma_handle_t
*
hdma
)
¶
-
DMA channel suspend default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_SetUserData
(
hal_dma_handle_t
*
hdma
,
const
void
*
p_user_data
)
¶
-
Store the user data into the DMA channel handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_user_data – Pointer to the user data
-
const
void
*
HAL_DMA_GetUserData
(
const
hal_dma_handle_t
*
hdma
)
¶
-
Retrieve the user data from the DMA channel handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
Pointer – to the user data
- group DMA_Exported_Functions_Group5
-
This subsection provides a set of functions to register the DMA channel process and error callbacks:
Call the function HAL_DMA_RegisterXferHalfCpltCallback() to register the DMA channel half transfer complete callback
Call the function HAL_DMA_RegisterXferCpltCallback() to register the DMA channel transfer complete callback
Call the function HAL_DMA_RegisterXferAbortCallback() to register the DMA channel abort callback
Call the function HAL_DMA_RegisterXferSuspendCallback() to register the DMA channel suspend callback
Call the function HAL_DMA_RegisterXferErrorCallback() to register the DMA channel error callback
Call the function HAL_DMA_SetUserData() to set a user data in handle
Call the function HAL_DMA_GetUserData() to get a user data from handle
Functions
-
hal_status_t
HAL_DMA_RegisterXferHalfCpltCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Half transfer complete callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel half transfer complete callback is successfully stored
-
hal_status_t
HAL_DMA_RegisterXferCpltCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Transfer complete callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel transfer complete callback is successfully stored
-
hal_status_t
HAL_DMA_RegisterXferAbortCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Abort callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel abort transfer callback is successfully stored
-
hal_status_t
HAL_DMA_RegisterXferSuspendCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Suspend callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel suspend transfer callback is successfully stored
-
hal_status_t
HAL_DMA_RegisterXferErrorCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Error callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel error transfer callback is successfully stored
-
void
HAL_DMA_XferHalfCpltCallback
(
hal_dma_handle_t
*
hdma
)
-
DMA channel half transfer complete default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_XferCpltCallback
(
hal_dma_handle_t
*
hdma
)
-
DMA channel transfer complete default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_XferAbortCallback
(
hal_dma_handle_t
*
hdma
)
-
DMA channel abort default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_XferSuspendCallback
(
hal_dma_handle_t
*
hdma
)
-
DMA channel suspend default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_XferErrorCallback
(
hal_dma_handle_t
*
hdma
)
-
DMA channel suspend default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_SetUserData
(
hal_dma_handle_t
*
hdma
,
const
void
*
p_user_data
)
-
Store the user data into the DMA channel handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_user_data – Pointer to the user data
-
const
void
*
HAL_DMA_GetUserData
(
const
hal_dma_handle_t
*
hdma
)
-
Retrieve the user data from the DMA channel handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
Pointer – to the user data
- group DMA_Exported_Functions_Group5
-
This subsection provides a set of functions to register the DMA channel process and error callbacks:
Call the function HAL_DMA_RegisterXferHalfCpltCallback() to register the DMA channel half transfer complete callback
Call the function HAL_DMA_RegisterXferCpltCallback() to register the DMA channel transfer complete callback
Call the function HAL_DMA_RegisterXferAbortCallback() to register the DMA channel abort callback
Call the function HAL_DMA_RegisterXferSuspendCallback() to register the DMA channel suspend callback
Call the function HAL_DMA_RegisterXferErrorCallback() to register the DMA channel error callback
Call the function HAL_DMA_SetUserData() to set a user data in handle
Call the function HAL_DMA_GetUserData() to get a user data from handle
Functions
-
hal_status_t
HAL_DMA_RegisterXferHalfCpltCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Half transfer complete callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel half transfer complete callback is successfully stored
-
hal_status_t
HAL_DMA_RegisterXferCpltCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Transfer complete callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel transfer complete callback is successfully stored
-
hal_status_t
HAL_DMA_RegisterXferAbortCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Abort callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel abort transfer callback is successfully stored
-
hal_status_t
HAL_DMA_RegisterXferSuspendCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Suspend callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel suspend transfer callback is successfully stored
-
hal_status_t
HAL_DMA_RegisterXferErrorCallback
(
hal_dma_handle_t
*
hdma
,
hal_dma_cb_t
callback
)
-
Store the given callback into the DMA handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
callback – Error callback
- Return values :
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
HAL_OK – DMA channel error transfer callback is successfully stored
-
void
HAL_DMA_XferHalfCpltCallback
(
hal_dma_handle_t
*
hdma
)
-
DMA channel half transfer complete default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_XferCpltCallback
(
hal_dma_handle_t
*
hdma
)
-
DMA channel transfer complete default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_XferAbortCallback
(
hal_dma_handle_t
*
hdma
)
-
DMA channel abort default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_XferSuspendCallback
(
hal_dma_handle_t
*
hdma
)
-
DMA channel suspend default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_XferErrorCallback
(
hal_dma_handle_t
*
hdma
)
-
DMA channel suspend default callback.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
void
HAL_DMA_SetUserData
(
hal_dma_handle_t
*
hdma
,
const
void
*
p_user_data
)
-
Store the user data into the DMA channel handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
p_user_data – Pointer to the user data
-
const
void
*
HAL_DMA_GetUserData
(
const
hal_dma_handle_t
*
hdma
)
-
Retrieve the user data from the DMA channel handle.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
Pointer – to the user data
Status functions ¶
- group DMA_Exported_Functions_Group6
-
This subsection provides a set of functions to get the DMA channel data information and status:
Call the function HAL_DMA_GetDirectXferRemainingDataByte() to get the DMA channel remaining data within the current transfer in byte
Call the function HAL_DMA_GetState() to get the DMA channel current state
Call the function HAL_DMA_GetLastErrorCodes() to get the DMA channel last errors codes
Functions
-
uint32_t
HAL_DMA_GetDirectXferRemainingDataByte
(
const
hal_dma_handle_t
*
hdma
)
¶
-
Get the DMA channel remaining data in the current transfer in byte.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
uint32_t – Direct transfer remaining data in byte
-
hal_dma_state_t
HAL_DMA_GetState
(
const
hal_dma_handle_t
*
hdma
)
¶
-
Get the DMA channel current state.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
hal_dma_state_t – DMA channel state
-
uint32_t
HAL_DMA_GetLastErrorCodes
(
const
hal_dma_handle_t
*
hdma
)
¶
-
Get last error codes.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
uint32_t – Last error codes which can be a combination of Error code definition reflecting asynchronous process errors
- group DMA_Exported_Functions_Group6
-
This subsection provides a set of functions to get the DMA channel data information and status:
Call the function HAL_DMA_GetDirectXferRemainingDataByte() to get the DMA channel remaining data within the current transfer in byte
Call the function HAL_DMA_GetState() to get the DMA channel current state
Call the function HAL_DMA_GetLastErrorCodes() to get the DMA channel last errors codes
Functions
-
uint32_t
HAL_DMA_GetDirectXferRemainingDataByte
(
const
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel remaining data in the current transfer in byte.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
uint32_t – Direct transfer remaining data in byte
-
hal_dma_state_t
HAL_DMA_GetState
(
const
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel current state.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
hal_dma_state_t – DMA channel state
-
uint32_t
HAL_DMA_GetLastErrorCodes
(
const
hal_dma_handle_t
*
hdma
)
-
Get last error codes.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
uint32_t – Last error codes which can be a combination of Error code definition reflecting asynchronous process errors
- group DMA_Exported_Functions_Group6
-
This subsection provides a set of functions to get the DMA channel data information and status:
Call the function HAL_DMA_GetDirectXferRemainingDataByte() to get the DMA channel remaining data within the current transfer in byte
Call the function HAL_DMA_GetState() to get the DMA channel current state
Call the function HAL_DMA_GetLastErrorCodes() to get the DMA channel last errors codes
Functions
-
uint32_t
HAL_DMA_GetDirectXferRemainingDataByte
(
const
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel remaining data in the current transfer in byte.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
uint32_t – Direct transfer remaining data in byte
-
hal_dma_state_t
HAL_DMA_GetState
(
const
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel current state.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
hal_dma_state_t – DMA channel state
-
uint32_t
HAL_DMA_GetLastErrorCodes
(
const
hal_dma_handle_t
*
hdma
)
-
Get last error codes.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
uint32_t – Last error codes which can be a combination of Error code definition reflecting asynchronous process errors