HAL DMA Functions ¶
Initialization and De-initialization functions ¶
- group DMA_Exported_Functions_Group1
-
This subsection provides a set of functions allowing 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 – Specifie the 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 by aborting any DMA ongoing transfer.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
- group DMA_Exported_Functions_Group1
-
This subsection provides a set of functions allowing 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 – Specifie the 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 by aborting any DMA ongoing transfer.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
- group DMA_Exported_Functions_Group1
-
This subsection provides a set of functions allowing 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 – Specifie the 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 by aborting any DMA ongoing transfer.
- Parameters :
-
hdma – Pointer to DMA channel handle
-
Configuration functions ¶
- group DMA_Exported_Functions_Group2
-
This subsection provides a set of functions allowing 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
Port transfer configuration
-
Call the function HAL_DMA_SetConfigDirectXferPort() to configure the DMA channel transfer ports according to configured parameters
-
Call the function HAL_DMA_ResetConfigDirectXferPort() to reset the DMA channel transfer ports configuration
-
Call the function HAL_DMA_GetConfigDirectXferPort() to get the current configured transfer ports
Burst transfer configuration
-
Call the function HAL_DMA_SetConfigDirectXferBurst() to configure the DMA channel burst length according to configured parameter
-
Call the function HAL_DMA_ResetConfigDirectXferBurst() to reset the DMA channel transfer burst configuration
-
Call the function HAL_DMA_GetConfigDirectXferBurst() to get the current configured burst
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
Repeated block transfer configuration
-
Call the function HAL_DMA_SetConfigDirectXferRepeatBlock() to configure the DMA channel repeated block according to configured parameter within hal_dma_repeat_block_config_t structure
-
Call the function HAL_DMA_ResetConfigDirectXferRepeatBlock() to reset the DMA channel transfer repeated block configuration
-
Call the function HAL_DMA_GetConfigDirectXferRepeatBlock() to get the current configured repeated block
Security access attributes configuration
-
Call the function HAL_DMA_SetConfigAccessAttributes() to configure the DMA channel security access attributes according to configured parameters
-
Call the function HAL_DMA_ResetConfigAccessAttributes() to reset the DMA channel security access attributes configuration
-
Call the function HAL_DMA_GetConfigAccessAttributes() to get the current configured security access attributes
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
Fetch node port transfer configuration
-
Call the function HAL_DMA_SetLinkedListXferFetchNodePort() to configure the DMA channel fetch node port according to selected parameter within hal_dma_port_t enumeration
-
Call the function HAL_DMA_ResetLinkedListXferFetchNodePort() to reset the DMA channel fetch node port configuration
-
Call the function HAL_DMA_GetLinkedListXferFetchNodePort() to get the current configured fetch node port
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_SetConfigDirectXferPort
(
hal_dma_handle_t
*
hdma
,
hal_dma_port_t
src_port
,
hal_dma_port_t
dest_port
)
¶
-
Set the DMA channel direct transfer source and destination allocated port configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
src_port – Pointer to hal_dma_port_t enumeration
-
dest_port – Pointer to hal_dma_port_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
-
HAL_OK – Direct transfer port is successfully configured
-
-
hal_status_t
HAL_DMA_ResetConfigDirectXferPort
(
hal_dma_handle_t
*
hdma
)
¶
-
Reset the DMA channel direct transfer port 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 port configuration is successful
-
-
void
HAL_DMA_GetConfigDirectXferPort
(
hal_dma_handle_t
*
hdma
,
hal_dma_port_t
*
p_src_port
,
hal_dma_port_t
*
p_dest_port
)
¶
-
Get the DMA channel direct transfer port configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_src_port – Pointer to hal_dma_port_t enumeration
-
p_dest_port – Pointer to hal_dma_port_t enumeration
-
-
hal_status_t
HAL_DMA_SetConfigDirectXferBurst
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_burst_length_byte
,
uint32_t
dest_burst_length_byte
)
¶
-
Set the DMA channel direct transfer burst configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
src_burst_length_byte – Source burst length in byte
-
dest_burst_length_byte – Destination burst length in byte
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
-
HAL_OK – Direct transfer burst is successfully configured
-
-
hal_status_t
HAL_DMA_ResetConfigDirectXferBurst
(
hal_dma_handle_t
*
hdma
)
¶
-
Reset the DMA channel direct transfer burst 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 burst configuration is successful
-
-
void
HAL_DMA_GetConfigDirectXferBurst
(
hal_dma_handle_t
*
hdma
,
uint32_t
*
p_src_burst_length_byte
,
uint32_t
*
p_dest_burst_length_byte
)
¶
-
Get the DMA channel direct transfer burst configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_src_burst_length_byte – Source burst length in byte
-
p_dest_burst_length_byte – Destination burst length in byte
-
-
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_SetConfigDirectXferRepeatBlock
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_repeat_block_config_t
*
p_config
)
¶
-
Set the DMA channel direct transfer repeated block configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_config – Pointer to hal_dma_repeat_block_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 repeated block is successfully configured
-
-
hal_status_t
HAL_DMA_ResetConfigDirectXferRepeatBlock
(
hal_dma_handle_t
*
hdma
)
¶
-
Reset the DMA channel direct transfer repeated block 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 repeated block configuration is successful
-
-
void
HAL_DMA_GetConfigDirectXferRepeatBlock
(
hal_dma_handle_t
*
hdma
,
hal_dma_repeat_block_config_t
*
p_config
)
¶
-
Get the DMA channel direct transfer repeated block configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_config – Pointer to hal_dma_repeat_block_config_t configuration structure
-
-
hal_status_t
HAL_DMA_SetConfigAccessAttributes
(
hal_dma_handle_t
*
hdma
,
hal_dma_sec_attr_t
src_attr
,
hal_dma_sec_attr_t
dest_attr
)
¶
-
Set the DMA channel security access attributes configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
src_attr – Element in hal_dma_sec_attr_t enumeration
-
dest_attr – Element in hal_dma_sec_attr_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
-
HAL_OK – Security access attributes is successfully configured
-
-
hal_status_t
HAL_DMA_ResetConfigAccessAttributes
(
hal_dma_handle_t
*
hdma
)
¶
-
Reset the DMA channel security access attributes 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 security access attributes configuration is successful
-
-
void
HAL_DMA_GetConfigAccessAttributes
(
hal_dma_handle_t
*
hdma
,
hal_dma_sec_attr_t
*
p_src_attr
,
hal_dma_sec_attr_t
*
p_dest_attr
)
¶
-
Get the DMA channel security access attributes configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_src_attr – Pointer to hal_dma_sec_attr_t enumeration
-
p_dest_attr – Pointer to hal_dma_sec_attr_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_SetLinkedListXferFetchNodePort
(
hal_dma_handle_t
*
hdma
,
hal_dma_port_t
fetch_port
)
¶
-
Set the DMA channel linked-list transfer fetch node port configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
fetch_port – Element in hal_dma_port_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
-
HAL_OK – Linked-list transfer fetch node port is successfully configured
-
-
hal_status_t
HAL_DMA_ResetLinkedListXferFetchNodePort
(
hal_dma_handle_t
*
hdma
)
¶
-
Reset the DMA channel linked-list transfer fetch node port 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 fetech node port configuration is successful
-
-
hal_dma_port_t
HAL_DMA_GetLinkedListXferFetchNodePort
(
hal_dma_handle_t
*
hdma
)
¶
-
Get the DMA channel linked-list transfer fetch node port configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
-
HAL_DMA_PORT0 – DMA channel port 0
-
HAL_DMA_PORT1 – DMA channel port 1
-
-
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 allowing 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
Port transfer configuration
-
Call the function HAL_DMA_SetConfigDirectXferPort() to configure the DMA channel transfer ports according to configured parameters
-
Call the function HAL_DMA_ResetConfigDirectXferPort() to reset the DMA channel transfer ports configuration
-
Call the function HAL_DMA_GetConfigDirectXferPort() to get the current configured transfer ports
Burst transfer configuration
-
Call the function HAL_DMA_SetConfigDirectXferBurst() to configure the DMA channel burst length according to configured parameter
-
Call the function HAL_DMA_ResetConfigDirectXferBurst() to reset the DMA channel transfer burst configuration
-
Call the function HAL_DMA_GetConfigDirectXferBurst() to get the current configured burst
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
Repeated block transfer configuration
-
Call the function HAL_DMA_SetConfigDirectXferRepeatBlock() to configure the DMA channel repeated block according to configured parameter within hal_dma_repeat_block_config_t structure
-
Call the function HAL_DMA_ResetConfigDirectXferRepeatBlock() to reset the DMA channel transfer repeated block configuration
-
Call the function HAL_DMA_GetConfigDirectXferRepeatBlock() to get the current configured repeated block
Security access attributes configuration
-
Call the function HAL_DMA_SetConfigAccessAttributes() to configure the DMA channel security access attributes according to configured parameters
-
Call the function HAL_DMA_ResetConfigAccessAttributes() to reset the DMA channel security access attributes configuration
-
Call the function HAL_DMA_GetConfigAccessAttributes() to get the current configured security access attributes
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
Fetch node port transfer configuration
-
Call the function HAL_DMA_SetLinkedListXferFetchNodePort() to configure the DMA channel fetch node port according to selected parameter within hal_dma_port_t enumeration
-
Call the function HAL_DMA_ResetLinkedListXferFetchNodePort() to reset the DMA channel fetch node port configuration
-
Call the function HAL_DMA_GetLinkedListXferFetchNodePort() to get the current configured fetch node port
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_SetConfigDirectXferPort
(
hal_dma_handle_t
*
hdma
,
hal_dma_port_t
src_port
,
hal_dma_port_t
dest_port
)
-
Set the DMA channel direct transfer source and destination allocated port configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
src_port – Pointer to hal_dma_port_t enumeration
-
dest_port – Pointer to hal_dma_port_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
-
HAL_OK – Direct transfer port is successfully configured
-
-
hal_status_t
HAL_DMA_ResetConfigDirectXferPort
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer port 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 port configuration is successful
-
-
void
HAL_DMA_GetConfigDirectXferPort
(
hal_dma_handle_t
*
hdma
,
hal_dma_port_t
*
p_src_port
,
hal_dma_port_t
*
p_dest_port
)
-
Get the DMA channel direct transfer port configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_src_port – Pointer to hal_dma_port_t enumeration
-
p_dest_port – Pointer to hal_dma_port_t enumeration
-
-
hal_status_t
HAL_DMA_SetConfigDirectXferBurst
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_burst_length_byte
,
uint32_t
dest_burst_length_byte
)
-
Set the DMA channel direct transfer burst configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
src_burst_length_byte – Source burst length in byte
-
dest_burst_length_byte – Destination burst length in byte
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
-
HAL_OK – Direct transfer burst is successfully configured
-
-
hal_status_t
HAL_DMA_ResetConfigDirectXferBurst
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer burst 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 burst configuration is successful
-
-
void
HAL_DMA_GetConfigDirectXferBurst
(
hal_dma_handle_t
*
hdma
,
uint32_t
*
p_src_burst_length_byte
,
uint32_t
*
p_dest_burst_length_byte
)
-
Get the DMA channel direct transfer burst configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_src_burst_length_byte – Source burst length in byte
-
p_dest_burst_length_byte – Destination burst length in byte
-
-
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_SetConfigDirectXferRepeatBlock
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_repeat_block_config_t
*
p_config
)
-
Set the DMA channel direct transfer repeated block configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_config – Pointer to hal_dma_repeat_block_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 repeated block is successfully configured
-
-
hal_status_t
HAL_DMA_ResetConfigDirectXferRepeatBlock
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer repeated block 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 repeated block configuration is successful
-
-
void
HAL_DMA_GetConfigDirectXferRepeatBlock
(
hal_dma_handle_t
*
hdma
,
hal_dma_repeat_block_config_t
*
p_config
)
-
Get the DMA channel direct transfer repeated block configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_config – Pointer to hal_dma_repeat_block_config_t configuration structure
-
-
hal_status_t
HAL_DMA_SetConfigAccessAttributes
(
hal_dma_handle_t
*
hdma
,
hal_dma_sec_attr_t
src_attr
,
hal_dma_sec_attr_t
dest_attr
)
-
Set the DMA channel security access attributes configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
src_attr – Element in hal_dma_sec_attr_t enumeration
-
dest_attr – Element in hal_dma_sec_attr_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
-
HAL_OK – Security access attributes is successfully configured
-
-
hal_status_t
HAL_DMA_ResetConfigAccessAttributes
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel security access attributes 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 security access attributes configuration is successful
-
-
void
HAL_DMA_GetConfigAccessAttributes
(
hal_dma_handle_t
*
hdma
,
hal_dma_sec_attr_t
*
p_src_attr
,
hal_dma_sec_attr_t
*
p_dest_attr
)
-
Get the DMA channel security access attributes configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_src_attr – Pointer to hal_dma_sec_attr_t enumeration
-
p_dest_attr – Pointer to hal_dma_sec_attr_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_SetLinkedListXferFetchNodePort
(
hal_dma_handle_t
*
hdma
,
hal_dma_port_t
fetch_port
)
-
Set the DMA channel linked-list transfer fetch node port configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
fetch_port – Element in hal_dma_port_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
-
HAL_OK – Linked-list transfer fetch node port is successfully configured
-
-
hal_status_t
HAL_DMA_ResetLinkedListXferFetchNodePort
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel linked-list transfer fetch node port 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 fetech node port configuration is successful
-
-
hal_dma_port_t
HAL_DMA_GetLinkedListXferFetchNodePort
(
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel linked-list transfer fetch node port configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
-
HAL_DMA_PORT0 – DMA channel port 0
-
HAL_DMA_PORT1 – DMA channel port 1
-
-
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 allowing 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
Port transfer configuration
-
Call the function HAL_DMA_SetConfigDirectXferPort() to configure the DMA channel transfer ports according to configured parameters
-
Call the function HAL_DMA_ResetConfigDirectXferPort() to reset the DMA channel transfer ports configuration
-
Call the function HAL_DMA_GetConfigDirectXferPort() to get the current configured transfer ports
Burst transfer configuration
-
Call the function HAL_DMA_SetConfigDirectXferBurst() to configure the DMA channel burst length according to configured parameter
-
Call the function HAL_DMA_ResetConfigDirectXferBurst() to reset the DMA channel transfer burst configuration
-
Call the function HAL_DMA_GetConfigDirectXferBurst() to get the current configured burst
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
Repeated block transfer configuration
-
Call the function HAL_DMA_SetConfigDirectXferRepeatBlock() to configure the DMA channel repeated block according to configured parameter within hal_dma_repeat_block_config_t structure
-
Call the function HAL_DMA_ResetConfigDirectXferRepeatBlock() to reset the DMA channel transfer repeated block configuration
-
Call the function HAL_DMA_GetConfigDirectXferRepeatBlock() to get the current configured repeated block
Security access attributes configuration
-
Call the function HAL_DMA_SetConfigAccessAttributes() to configure the DMA channel security access attributes according to configured parameters
-
Call the function HAL_DMA_ResetConfigAccessAttributes() to reset the DMA channel security access attributes configuration
-
Call the function HAL_DMA_GetConfigAccessAttributes() to get the current configured security access attributes
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
Fetch node port transfer configuration
-
Call the function HAL_DMA_SetLinkedListXferFetchNodePort() to configure the DMA channel fetch node port according to selected parameter within hal_dma_port_t enumeration
-
Call the function HAL_DMA_ResetLinkedListXferFetchNodePort() to reset the DMA channel fetch node port configuration
-
Call the function HAL_DMA_GetLinkedListXferFetchNodePort() to get the current configured fetch node port
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_SetConfigDirectXferPort
(
hal_dma_handle_t
*
hdma
,
hal_dma_port_t
src_port
,
hal_dma_port_t
dest_port
)
-
Set the DMA channel direct transfer source and destination allocated port configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
src_port – Pointer to hal_dma_port_t enumeration
-
dest_port – Pointer to hal_dma_port_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
-
HAL_OK – Direct transfer port is successfully configured
-
-
hal_status_t
HAL_DMA_ResetConfigDirectXferPort
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer port 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 port configuration is successful
-
-
void
HAL_DMA_GetConfigDirectXferPort
(
hal_dma_handle_t
*
hdma
,
hal_dma_port_t
*
p_src_port
,
hal_dma_port_t
*
p_dest_port
)
-
Get the DMA channel direct transfer port configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_src_port – Pointer to hal_dma_port_t enumeration
-
p_dest_port – Pointer to hal_dma_port_t enumeration
-
-
hal_status_t
HAL_DMA_SetConfigDirectXferBurst
(
hal_dma_handle_t
*
hdma
,
uint32_t
src_burst_length_byte
,
uint32_t
dest_burst_length_byte
)
-
Set the DMA channel direct transfer burst configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
src_burst_length_byte – Source burst length in byte
-
dest_burst_length_byte – Destination burst length in byte
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
-
HAL_OK – Direct transfer burst is successfully configured
-
-
hal_status_t
HAL_DMA_ResetConfigDirectXferBurst
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer burst 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 burst configuration is successful
-
-
void
HAL_DMA_GetConfigDirectXferBurst
(
hal_dma_handle_t
*
hdma
,
uint32_t
*
p_src_burst_length_byte
,
uint32_t
*
p_dest_burst_length_byte
)
-
Get the DMA channel direct transfer burst configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_src_burst_length_byte – Source burst length in byte
-
p_dest_burst_length_byte – Destination burst length in byte
-
-
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_SetConfigDirectXferRepeatBlock
(
hal_dma_handle_t
*
hdma
,
const
hal_dma_repeat_block_config_t
*
p_config
)
-
Set the DMA channel direct transfer repeated block configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_config – Pointer to hal_dma_repeat_block_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 repeated block is successfully configured
-
-
hal_status_t
HAL_DMA_ResetConfigDirectXferRepeatBlock
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel direct transfer repeated block 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 repeated block configuration is successful
-
-
void
HAL_DMA_GetConfigDirectXferRepeatBlock
(
hal_dma_handle_t
*
hdma
,
hal_dma_repeat_block_config_t
*
p_config
)
-
Get the DMA channel direct transfer repeated block configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_config – Pointer to hal_dma_repeat_block_config_t configuration structure
-
-
hal_status_t
HAL_DMA_SetConfigAccessAttributes
(
hal_dma_handle_t
*
hdma
,
hal_dma_sec_attr_t
src_attr
,
hal_dma_sec_attr_t
dest_attr
)
-
Set the DMA channel security access attributes configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
src_attr – Element in hal_dma_sec_attr_t enumeration
-
dest_attr – Element in hal_dma_sec_attr_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is not direct
-
HAL_OK – Security access attributes is successfully configured
-
-
hal_status_t
HAL_DMA_ResetConfigAccessAttributes
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel security access attributes 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 security access attributes configuration is successful
-
-
void
HAL_DMA_GetConfigAccessAttributes
(
hal_dma_handle_t
*
hdma
,
hal_dma_sec_attr_t
*
p_src_attr
,
hal_dma_sec_attr_t
*
p_dest_attr
)
-
Get the DMA channel security access attributes configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
p_src_attr – Pointer to hal_dma_sec_attr_t enumeration
-
p_dest_attr – Pointer to hal_dma_sec_attr_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_SetLinkedListXferFetchNodePort
(
hal_dma_handle_t
*
hdma
,
hal_dma_port_t
fetch_port
)
-
Set the DMA channel linked-list transfer fetch node port configuration.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
fetch_port – Element in hal_dma_port_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when transfer mode parameter is direct
-
HAL_OK – Linked-list transfer fetch node port is successfully configured
-
-
hal_status_t
HAL_DMA_ResetLinkedListXferFetchNodePort
(
hal_dma_handle_t
*
hdma
)
-
Reset the DMA channel linked-list transfer fetch node port 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 fetech node port configuration is successful
-
-
hal_dma_port_t
HAL_DMA_GetLinkedListXferFetchNodePort
(
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel linked-list transfer fetch node port configuration.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
-
HAL_DMA_PORT0 – DMA channel port 0
-
HAL_DMA_PORT1 – DMA channel port 1
-
-
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 allowing 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
Port node configuration
-
Call the function HAL_DMA_FillNodePort() to fill the node port according to selected port parameter
-
Call the function HAL_DMA_GetNodePort() to get the current node port selection
Burst node configuration
-
Call the function HAL_DMA_FillNodeBurst() to fill the node burst according to selected burst parameter
-
Call the function HAL_DMA_GetNodeBurst() to get the current node burst 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
Repeated block node configuration
-
Call the function HAL_DMA_FillNodeRepeatBlock() to fill the node repeated block according to configured repeated block parameters
-
Call the function HAL_DMA_GetNodeRepeatBlock() to get the current node repeated block configuration
Security access attributes node configuration
-
Call the function HAL_DMA_FillNodeAccessAttributes() to fill the node security access attributes according to configured security access attributes parameters
-
Call the function HAL_DMA_GetNodeAccessAttributes() to get the current node security access attributes 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_FillNodePort
(
hal_dma_node_t
*
p_node
,
hal_dma_port_t
src_port
,
hal_dma_port_t
dest_port
)
¶
-
Fill node port configuration.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
src_port – Element in hal_dma_port_t enumeration
-
dest_port – Element in hal_dma_port_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
-
HAL_OK – Fill node port is successfully configured
-
-
void
HAL_DMA_GetNodePort
(
const
hal_dma_node_t
*
p_node
,
hal_dma_port_t
*
p_src_port
,
hal_dma_port_t
*
p_dest_port
)
¶
-
Get the configuration of node port.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
p_src_port – Element in hal_dma_port_t enumeration
-
p_dest_port – Element in hal_dma_port_t enumeration
-
-
hal_status_t
HAL_DMA_FillNodeBurst
(
hal_dma_node_t
*
p_node
,
uint32_t
src_burst_length_byte
,
uint32_t
dest_burst_length_byte
)
¶
-
Fill node burst configuration.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
src_burst_length_byte – Source burst length in byte
-
dest_burst_length_byte – Source burst length in byte
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
-
HAL_OK – Fill node burst is successfully configured
-
-
void
HAL_DMA_GetNodeBurst
(
const
hal_dma_node_t
*
p_node
,
uint32_t
*
p_src_burst_length_byte
,
uint32_t
*
p_dest_burst_length_byte
)
¶
-
Get the configuration of node port.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
p_src_burst_length_byte – Source burst length in byte
-
p_dest_burst_length_byte – Source burst length in byte
-
-
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_REPEATED_BLOCK – DMA Channel transfer event mode is at repeated 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_FillNodeRepeatBlock
(
hal_dma_node_t
*
p_node
,
const
hal_dma_repeat_block_config_t
*
p_config
)
¶
-
Fill node repeated block configuration.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
p_config – Pointer to hal_dma_repeat_block_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 repeated block is successfully configured
-
-
void
HAL_DMA_GetNodeRepeatBlock
(
const
hal_dma_node_t
*
p_node
,
hal_dma_repeat_block_config_t
*
p_config
)
¶
-
Get the configuration of node repeated block.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
p_config – Pointer to hal_dma_repeat_block_config_t configuration structure
-
-
hal_status_t
HAL_DMA_FillNodeAccessAttributes
(
hal_dma_node_t
*
p_node
,
hal_dma_sec_attr_t
src_attr
,
hal_dma_sec_attr_t
dest_attr
)
¶
-
Fill node access attributes.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t structure
-
src_attr – Element in hal_dma_sec_attr_t enumeration
-
dest_attr – Element in hal_dma_sec_attr_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
-
HAL_OK – Fill node access attributes is successfully configured
-
-
void
HAL_DMA_GetNodeAccessAttributes
(
const
hal_dma_node_t
*
p_node
,
hal_dma_sec_attr_t
*
p_src_attr
,
hal_dma_sec_attr_t
*
p_dest_attr
)
¶
-
Get node access attributes.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t structure
-
p_src_attr – Pointer to hal_dma_sec_attr_t enumeration
-
p_dest_attr – Pointer to hal_dma_sec_attr_t enumeration
-
-
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 allowing 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
Port node configuration
-
Call the function HAL_DMA_FillNodePort() to fill the node port according to selected port parameter
-
Call the function HAL_DMA_GetNodePort() to get the current node port selection
Burst node configuration
-
Call the function HAL_DMA_FillNodeBurst() to fill the node burst according to selected burst parameter
-
Call the function HAL_DMA_GetNodeBurst() to get the current node burst 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
Repeated block node configuration
-
Call the function HAL_DMA_FillNodeRepeatBlock() to fill the node repeated block according to configured repeated block parameters
-
Call the function HAL_DMA_GetNodeRepeatBlock() to get the current node repeated block configuration
Security access attributes node configuration
-
Call the function HAL_DMA_FillNodeAccessAttributes() to fill the node security access attributes according to configured security access attributes parameters
-
Call the function HAL_DMA_GetNodeAccessAttributes() to get the current node security access attributes 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_FillNodePort
(
hal_dma_node_t
*
p_node
,
hal_dma_port_t
src_port
,
hal_dma_port_t
dest_port
)
-
Fill node port configuration.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
src_port – Element in hal_dma_port_t enumeration
-
dest_port – Element in hal_dma_port_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
-
HAL_OK – Fill node port is successfully configured
-
-
void
HAL_DMA_GetNodePort
(
const
hal_dma_node_t
*
p_node
,
hal_dma_port_t
*
p_src_port
,
hal_dma_port_t
*
p_dest_port
)
-
Get the configuration of node port.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
p_src_port – Element in hal_dma_port_t enumeration
-
p_dest_port – Element in hal_dma_port_t enumeration
-
-
hal_status_t
HAL_DMA_FillNodeBurst
(
hal_dma_node_t
*
p_node
,
uint32_t
src_burst_length_byte
,
uint32_t
dest_burst_length_byte
)
-
Fill node burst configuration.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
src_burst_length_byte – Source burst length in byte
-
dest_burst_length_byte – Source burst length in byte
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
-
HAL_OK – Fill node burst is successfully configured
-
-
void
HAL_DMA_GetNodeBurst
(
const
hal_dma_node_t
*
p_node
,
uint32_t
*
p_src_burst_length_byte
,
uint32_t
*
p_dest_burst_length_byte
)
-
Get the configuration of node port.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
p_src_burst_length_byte – Source burst length in byte
-
p_dest_burst_length_byte – Source burst length in byte
-
-
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_REPEATED_BLOCK – DMA Channel transfer event mode is at repeated 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_FillNodeRepeatBlock
(
hal_dma_node_t
*
p_node
,
const
hal_dma_repeat_block_config_t
*
p_config
)
-
Fill node repeated block configuration.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
p_config – Pointer to hal_dma_repeat_block_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 repeated block is successfully configured
-
-
void
HAL_DMA_GetNodeRepeatBlock
(
const
hal_dma_node_t
*
p_node
,
hal_dma_repeat_block_config_t
*
p_config
)
-
Get the configuration of node repeated block.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
p_config – Pointer to hal_dma_repeat_block_config_t configuration structure
-
-
hal_status_t
HAL_DMA_FillNodeAccessAttributes
(
hal_dma_node_t
*
p_node
,
hal_dma_sec_attr_t
src_attr
,
hal_dma_sec_attr_t
dest_attr
)
-
Fill node access attributes.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t structure
-
src_attr – Element in hal_dma_sec_attr_t enumeration
-
dest_attr – Element in hal_dma_sec_attr_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
-
HAL_OK – Fill node access attributes is successfully configured
-
-
void
HAL_DMA_GetNodeAccessAttributes
(
const
hal_dma_node_t
*
p_node
,
hal_dma_sec_attr_t
*
p_src_attr
,
hal_dma_sec_attr_t
*
p_dest_attr
)
-
Get node access attributes.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t structure
-
p_src_attr – Pointer to hal_dma_sec_attr_t enumeration
-
p_dest_attr – Pointer to hal_dma_sec_attr_t enumeration
-
-
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 allowing 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
Port node configuration
-
Call the function HAL_DMA_FillNodePort() to fill the node port according to selected port parameter
-
Call the function HAL_DMA_GetNodePort() to get the current node port selection
Burst node configuration
-
Call the function HAL_DMA_FillNodeBurst() to fill the node burst according to selected burst parameter
-
Call the function HAL_DMA_GetNodeBurst() to get the current node burst 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
Repeated block node configuration
-
Call the function HAL_DMA_FillNodeRepeatBlock() to fill the node repeated block according to configured repeated block parameters
-
Call the function HAL_DMA_GetNodeRepeatBlock() to get the current node repeated block configuration
Security access attributes node configuration
-
Call the function HAL_DMA_FillNodeAccessAttributes() to fill the node security access attributes according to configured security access attributes parameters
-
Call the function HAL_DMA_GetNodeAccessAttributes() to get the current node security access attributes 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_FillNodePort
(
hal_dma_node_t
*
p_node
,
hal_dma_port_t
src_port
,
hal_dma_port_t
dest_port
)
-
Fill node port configuration.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
src_port – Element in hal_dma_port_t enumeration
-
dest_port – Element in hal_dma_port_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
-
HAL_OK – Fill node port is successfully configured
-
-
void
HAL_DMA_GetNodePort
(
const
hal_dma_node_t
*
p_node
,
hal_dma_port_t
*
p_src_port
,
hal_dma_port_t
*
p_dest_port
)
-
Get the configuration of node port.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
p_src_port – Element in hal_dma_port_t enumeration
-
p_dest_port – Element in hal_dma_port_t enumeration
-
-
hal_status_t
HAL_DMA_FillNodeBurst
(
hal_dma_node_t
*
p_node
,
uint32_t
src_burst_length_byte
,
uint32_t
dest_burst_length_byte
)
-
Fill node burst configuration.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
src_burst_length_byte – Source burst length in byte
-
dest_burst_length_byte – Source burst length in byte
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
-
HAL_OK – Fill node burst is successfully configured
-
-
void
HAL_DMA_GetNodeBurst
(
const
hal_dma_node_t
*
p_node
,
uint32_t
*
p_src_burst_length_byte
,
uint32_t
*
p_dest_burst_length_byte
)
-
Get the configuration of node port.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
p_src_burst_length_byte – Source burst length in byte
-
p_dest_burst_length_byte – Source burst length in byte
-
-
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_REPEATED_BLOCK – DMA Channel transfer event mode is at repeated 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_FillNodeRepeatBlock
(
hal_dma_node_t
*
p_node
,
const
hal_dma_repeat_block_config_t
*
p_config
)
-
Fill node repeated block configuration.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
p_config – Pointer to hal_dma_repeat_block_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 repeated block is successfully configured
-
-
void
HAL_DMA_GetNodeRepeatBlock
(
const
hal_dma_node_t
*
p_node
,
hal_dma_repeat_block_config_t
*
p_config
)
-
Get the configuration of node repeated block.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t node structure
-
p_config – Pointer to hal_dma_repeat_block_config_t configuration structure
-
-
hal_status_t
HAL_DMA_FillNodeAccessAttributes
(
hal_dma_node_t
*
p_node
,
hal_dma_sec_attr_t
src_attr
,
hal_dma_sec_attr_t
dest_attr
)
-
Fill node access attributes.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t structure
-
src_attr – Element in hal_dma_sec_attr_t enumeration
-
dest_attr – Element in hal_dma_sec_attr_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_node pointer is NULL
-
HAL_OK – Fill node access attributes is successfully configured
-
-
void
HAL_DMA_GetNodeAccessAttributes
(
const
hal_dma_node_t
*
p_node
,
hal_dma_sec_attr_t
*
p_src_attr
,
hal_dma_sec_attr_t
*
p_dest_attr
)
-
Get node access attributes.
- Parameters :
-
-
p_node – Pointer to hal_dma_node_t structure
-
p_src_attr – Pointer to hal_dma_sec_attr_t enumeration
-
p_dest_attr – Pointer to hal_dma_sec_attr_t enumeration
-
-
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 allowing 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 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 instantly
-
Call the function HAL_DMA_PollForXfer() to poll on any finite DMA channel transfer level selected through hal_dma_xfer_lvl_t
-
Call the function HAL_DMA_IRQHandler() to handle any DMA channel interrupt. This API must 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 – Specifies the DMA optional interrupt to be enable. 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_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 – Specifies the DMA optional interrupt to be enable. 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 instantantly any suspended DMA channel transfer.
- 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_msec
)
¶
-
Polling for transfer status for finite DMA channel silent transfers.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
xfer_level – Specifies the DMA channel transfer level
-
timeout_msec – Specifies the user timeout in milli-second
-
- 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 allowing 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 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 instantly
-
Call the function HAL_DMA_PollForXfer() to poll on any finite DMA channel transfer level selected through hal_dma_xfer_lvl_t
-
Call the function HAL_DMA_IRQHandler() to handle any DMA channel interrupt. This API must 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 – Specifies the DMA optional interrupt to be enable. 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_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 – Specifies the DMA optional interrupt to be enable. 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 instantantly any suspended DMA channel transfer.
- 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_msec
)
-
Polling for transfer status for finite DMA channel silent transfers.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
xfer_level – Specifies the DMA channel transfer level
-
timeout_msec – Specifies the user timeout in milli-second
-
- 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 allowing 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 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 instantly
-
Call the function HAL_DMA_PollForXfer() to poll on any finite DMA channel transfer level selected through hal_dma_xfer_lvl_t
-
Call the function HAL_DMA_IRQHandler() to handle any DMA channel interrupt. This API must 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 – Specifies the DMA optional interrupt to be enable. 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_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 – Specifies the DMA optional interrupt to be enable. 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 instantantly any suspended DMA channel transfer.
- 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_msec
)
-
Polling for transfer status for finite DMA channel silent transfers.
- Parameters :
-
-
hdma – Pointer to DMA channel handle
-
xfer_level – Specifies the DMA channel transfer level
-
timeout_msec – Specifies the user timeout in milli-second
-
- 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 allowing 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 – Specifies the 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 – Specifies the 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 – Specifies the 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 – Specifies the 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 – Specifies the 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 allowing 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 – Specifies the 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 – Specifies the 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 – Specifies the 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 – Specifies the 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 – Specifies the 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 allowing 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 – Specifies the 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 – Specifies the 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 – Specifies the 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 – Specifies the 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 – Specifies the 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 allowing to get the DMA channel data information and status:
-
Call the function HAL_DMA_GetFifoDataByte() to get the DMA channel the FIFO when available in byte
-
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_GetFifoDataByte
(
const
hal_dma_handle_t
*
hdma
)
¶
-
Get the DMA channel remaining data in the FIFO in byte.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
uint32_t – FIFO remaining data in byte
-
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 the processes asynchronous errors
-
- group DMA_Exported_Functions_Group6
-
This subsection provides a set of functions allowing to get the DMA channel data information and status:
-
Call the function HAL_DMA_GetFifoDataByte() to get the DMA channel the FIFO when available in byte
-
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_GetFifoDataByte
(
const
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel remaining data in the FIFO in byte.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
uint32_t – FIFO remaining data in byte
-
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 the processes asynchronous errors
-
- group DMA_Exported_Functions_Group6
-
This subsection provides a set of functions allowing to get the DMA channel data information and status:
-
Call the function HAL_DMA_GetFifoDataByte() to get the DMA channel the FIFO when available in byte
-
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_GetFifoDataByte
(
const
hal_dma_handle_t
*
hdma
)
-
Get the DMA channel remaining data in the FIFO in byte.
- Parameters :
-
hdma – Pointer to DMA channel handle
- Return values :
-
uint32_t – FIFO remaining data in byte
-
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 the processes asynchronous errors
-