STM32F103xB HAL User Manual
Functions
Configuration
DMA Exported Functions

Functions

__STATIC_INLINE void LL_DMA_EnableChannel (DMA_TypeDef *DMAx, uint32_t Channel)
 Enable DMA channel.
__STATIC_INLINE void LL_DMA_DisableChannel (DMA_TypeDef *DMAx, uint32_t Channel)
 Disable DMA channel.
__STATIC_INLINE uint32_t LL_DMA_IsEnabledChannel (DMA_TypeDef *DMAx, uint32_t Channel)
 Check if DMA channel is enabled or disabled.
__STATIC_INLINE void LL_DMA_ConfigTransfer (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t Configuration)
 Configure all parameters link to DMA transfer.
__STATIC_INLINE void LL_DMA_SetDataTransferDirection (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t Direction)
 Set Data transfer direction (read from peripheral or from memory).
__STATIC_INLINE uint32_t LL_DMA_GetDataTransferDirection (DMA_TypeDef *DMAx, uint32_t Channel)
 Get Data transfer direction (read from peripheral or from memory).
__STATIC_INLINE void LL_DMA_SetMode (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t Mode)
 Set DMA mode circular or normal.
__STATIC_INLINE uint32_t LL_DMA_GetMode (DMA_TypeDef *DMAx, uint32_t Channel)
 Get DMA mode circular or normal.
__STATIC_INLINE void LL_DMA_SetPeriphIncMode (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t PeriphOrM2MSrcIncMode)
 Set Peripheral increment mode.
__STATIC_INLINE uint32_t LL_DMA_GetPeriphIncMode (DMA_TypeDef *DMAx, uint32_t Channel)
 Get Peripheral increment mode.
__STATIC_INLINE void LL_DMA_SetMemoryIncMode (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t MemoryOrM2MDstIncMode)
 Set Memory increment mode.
__STATIC_INLINE uint32_t LL_DMA_GetMemoryIncMode (DMA_TypeDef *DMAx, uint32_t Channel)
 Get Memory increment mode.
__STATIC_INLINE void LL_DMA_SetPeriphSize (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t PeriphOrM2MSrcDataSize)
 Set Peripheral size.
__STATIC_INLINE uint32_t LL_DMA_GetPeriphSize (DMA_TypeDef *DMAx, uint32_t Channel)
 Get Peripheral size.
__STATIC_INLINE void LL_DMA_SetMemorySize (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t MemoryOrM2MDstDataSize)
 Set Memory size.
__STATIC_INLINE uint32_t LL_DMA_GetMemorySize (DMA_TypeDef *DMAx, uint32_t Channel)
 Get Memory size.
__STATIC_INLINE void LL_DMA_SetChannelPriorityLevel (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t Priority)
 Set Channel priority level.
__STATIC_INLINE uint32_t LL_DMA_GetChannelPriorityLevel (DMA_TypeDef *DMAx, uint32_t Channel)
 Get Channel priority level.
__STATIC_INLINE void LL_DMA_SetDataLength (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t NbData)
 Set Number of data to transfer.
__STATIC_INLINE uint32_t LL_DMA_GetDataLength (DMA_TypeDef *DMAx, uint32_t Channel)
 Get Number of data to transfer.
__STATIC_INLINE void LL_DMA_ConfigAddresses (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t SrcAddress, uint32_t DstAddress, uint32_t Direction)
 Configure the Source and Destination addresses.
__STATIC_INLINE void LL_DMA_SetMemoryAddress (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t MemoryAddress)
 Set the Memory address.
__STATIC_INLINE void LL_DMA_SetPeriphAddress (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t PeriphAddress)
 Set the Peripheral address.
__STATIC_INLINE uint32_t LL_DMA_GetMemoryAddress (DMA_TypeDef *DMAx, uint32_t Channel)
 Get Memory address.
__STATIC_INLINE uint32_t LL_DMA_GetPeriphAddress (DMA_TypeDef *DMAx, uint32_t Channel)
 Get Peripheral address.
__STATIC_INLINE void LL_DMA_SetM2MSrcAddress (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t MemoryAddress)
 Set the Memory to Memory Source address.
__STATIC_INLINE void LL_DMA_SetM2MDstAddress (DMA_TypeDef *DMAx, uint32_t Channel, uint32_t MemoryAddress)
 Set the Memory to Memory Destination address.
__STATIC_INLINE uint32_t LL_DMA_GetM2MSrcAddress (DMA_TypeDef *DMAx, uint32_t Channel)
 Get the Memory to Memory Source address.
__STATIC_INLINE uint32_t LL_DMA_GetM2MDstAddress (DMA_TypeDef *DMAx, uint32_t Channel)
 Get the Memory to Memory Destination address.

Function Documentation

__STATIC_INLINE void LL_DMA_ConfigAddresses ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  SrcAddress,
uint32_t  DstAddress,
uint32_t  Direction 
)

Configure the Source and Destination addresses.

Note:
This API must not be called when the DMA channel is enabled.
Each IP using DMA provides an API to get directly the register adress (LL_PPP_DMA_GetRegAddr).
Reference Manual to LL API cross reference:
CPAR PA LL_DMA_ConfigAddresses
CMAR MA LL_DMA_ConfigAddresses
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
SrcAddressBetween Min_Data = 0 and Max_Data = 0xFFFFFFFF
DstAddressBetween Min_Data = 0 and Max_Data = 0xFFFFFFFF
DirectionThis parameter can be one of the following values:
Return values:
None

Definition at line 931 of file stm32f1xx_ll_dma.h.

References LL_DMA_DIRECTION_MEMORY_TO_PERIPH.

__STATIC_INLINE void LL_DMA_ConfigTransfer ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  Configuration 
)

Configure all parameters link to DMA transfer.

Reference Manual to LL API cross reference:
CCR DIR LL_DMA_ConfigTransfer
CCR MEM2MEM LL_DMA_ConfigTransfer
CCR CIRC LL_DMA_ConfigTransfer
CCR PINC LL_DMA_ConfigTransfer
CCR MINC LL_DMA_ConfigTransfer
CCR PSIZE LL_DMA_ConfigTransfer
CCR MSIZE LL_DMA_ConfigTransfer
CCR PL LL_DMA_ConfigTransfer
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
ConfigurationThis parameter must be a combination of all the following values:
Return values:
None

Definition at line 527 of file stm32f1xx_ll_dma.h.

Referenced by LL_DMA_Init().

__STATIC_INLINE void LL_DMA_DisableChannel ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Disable DMA channel.

Reference Manual to LL API cross reference:
CCR EN LL_DMA_DisableChannel
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
None

Definition at line 473 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE void LL_DMA_EnableChannel ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Enable DMA channel.

Reference Manual to LL API cross reference:
CCR EN LL_DMA_EnableChannel
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
None

Definition at line 454 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE uint32_t LL_DMA_GetChannelPriorityLevel ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Get Channel priority level.

Reference Manual to LL API cross reference:
CCR PL LL_DMA_GetChannelPriorityLevel
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 857 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE uint32_t LL_DMA_GetDataLength ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Get Number of data to transfer.

Note:
Once the channel is enabled, the return value indicate the remaining bytes to be transmitted.
Reference Manual to LL API cross reference:
CNDTR NDT LL_DMA_GetDataLength
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
BetweenMin_Data = 0 and Max_Data = 0xFFFFFFFF

Definition at line 902 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE uint32_t LL_DMA_GetDataTransferDirection ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Get Data transfer direction (read from peripheral or from memory).

Reference Manual to LL API cross reference:
CCR DIR LL_DMA_GetDataTransferDirection
CCR MEM2MEM LL_DMA_GetDataTransferDirection
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 577 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE uint32_t LL_DMA_GetM2MDstAddress ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Get the Memory to Memory Destination address.

Note:
Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only.
Reference Manual to LL API cross reference:
CMAR MA LL_DMA_GetM2MDstAddress
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
BetweenMin_Data = 0 and Max_Data = 0xFFFFFFFF

Definition at line 1111 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE uint32_t LL_DMA_GetM2MSrcAddress ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Get the Memory to Memory Source address.

Note:
Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only.
Reference Manual to LL API cross reference:
CPAR PA LL_DMA_GetM2MSrcAddress
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
BetweenMin_Data = 0 and Max_Data = 0xFFFFFFFF

Definition at line 1091 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE uint32_t LL_DMA_GetMemoryAddress ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Get Memory address.

Note:
Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only.
Reference Manual to LL API cross reference:
CMAR MA LL_DMA_GetMemoryAddress
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
BetweenMin_Data = 0 and Max_Data = 0xFFFFFFFF

Definition at line 1007 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE uint32_t LL_DMA_GetMemoryIncMode ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Get Memory increment mode.

Reference Manual to LL API cross reference:
CCR MINC LL_DMA_GetMemoryIncMode
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 714 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE uint32_t LL_DMA_GetMemorySize ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Get Memory size.

Reference Manual to LL API cross reference:
CCR MSIZE LL_DMA_GetMemorySize
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 808 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE uint32_t LL_DMA_GetMode ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Get DMA mode circular or normal.

Reference Manual to LL API cross reference:
CCR CIRC LL_DMA_GetMode
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 624 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE uint32_t LL_DMA_GetPeriphAddress ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Get Peripheral address.

Note:
Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only.
Reference Manual to LL API cross reference:
CPAR PA LL_DMA_GetPeriphAddress
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
BetweenMin_Data = 0 and Max_Data = 0xFFFFFFFF

Definition at line 1027 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE uint32_t LL_DMA_GetPeriphIncMode ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Get Peripheral increment mode.

Reference Manual to LL API cross reference:
CCR PINC LL_DMA_GetPeriphIncMode
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 669 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE uint32_t LL_DMA_GetPeriphSize ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Get Peripheral size.

Reference Manual to LL API cross reference:
CCR PSIZE LL_DMA_GetPeriphSize
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 761 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE uint32_t LL_DMA_IsEnabledChannel ( DMA_TypeDef *  DMAx,
uint32_t  Channel 
)

Check if DMA channel is enabled or disabled.

Reference Manual to LL API cross reference:
CCR EN LL_DMA_IsEnabledChannel
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
Return values:
Stateof bit (1 or 0).

Definition at line 492 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE void LL_DMA_SetChannelPriorityLevel ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  Priority 
)

Set Channel priority level.

Reference Manual to LL API cross reference:
CCR PL LL_DMA_SetChannelPriorityLevel
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
PriorityThis parameter can be one of the following values:
Return values:
None

Definition at line 833 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE void LL_DMA_SetDataLength ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  NbData 
)

Set Number of data to transfer.

Note:
This action has no effect if channel is enabled.
Reference Manual to LL API cross reference:
CNDTR NDT LL_DMA_SetDataLength
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
NbDataBetween Min_Data = 0 and Max_Data = 0x0000FFFF
Return values:
None

Definition at line 880 of file stm32f1xx_ll_dma.h.

Referenced by LL_DMA_Init().

__STATIC_INLINE void LL_DMA_SetDataTransferDirection ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  Direction 
)

Set Data transfer direction (read from peripheral or from memory).

Reference Manual to LL API cross reference:
CCR DIR LL_DMA_SetDataTransferDirection
CCR MEM2MEM LL_DMA_SetDataTransferDirection
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
DirectionThis parameter can be one of the following values:
Return values:
None

Definition at line 553 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE void LL_DMA_SetM2MDstAddress ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  MemoryAddress 
)

Set the Memory to Memory Destination address.

Note:
Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only.
This API must not be called when the DMA channel is enabled.
Reference Manual to LL API cross reference:
CMAR MA LL_DMA_SetM2MDstAddress
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
MemoryAddressBetween Min_Data = 0 and Max_Data = 0xFFFFFFFF
Return values:
None

Definition at line 1071 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE void LL_DMA_SetM2MSrcAddress ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  MemoryAddress 
)

Set the Memory to Memory Source address.

Note:
Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only.
This API must not be called when the DMA channel is enabled.
Reference Manual to LL API cross reference:
CPAR PA LL_DMA_SetM2MSrcAddress
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
MemoryAddressBetween Min_Data = 0 and Max_Data = 0xFFFFFFFF
Return values:
None

Definition at line 1049 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE void LL_DMA_SetMemoryAddress ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  MemoryAddress 
)

Set the Memory address.

Note:
Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only.
This API must not be called when the DMA channel is enabled.
Reference Manual to LL API cross reference:
CMAR MA LL_DMA_SetMemoryAddress
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
MemoryAddressBetween Min_Data = 0 and Max_Data = 0xFFFFFFFF
Return values:
None

Definition at line 965 of file stm32f1xx_ll_dma.h.

Referenced by LL_DMA_Init().

__STATIC_INLINE void LL_DMA_SetMemoryIncMode ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  MemoryOrM2MDstIncMode 
)

Set Memory increment mode.

Reference Manual to LL API cross reference:
CCR MINC LL_DMA_SetMemoryIncMode
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
MemoryOrM2MDstIncModeThis parameter can be one of the following values:
Return values:
None

Definition at line 692 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE void LL_DMA_SetMemorySize ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  MemoryOrM2MDstDataSize 
)

Set Memory size.

Reference Manual to LL API cross reference:
CCR MSIZE LL_DMA_SetMemorySize
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
MemoryOrM2MDstDataSizeThis parameter can be one of the following values:
Return values:
None

Definition at line 785 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE void LL_DMA_SetMode ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  Mode 
)

Set DMA mode circular or normal.

Note:
The circular buffer mode cannot be used if the memory-to-memory data transfer is configured on the selected Channel.
Reference Manual to LL API cross reference:
CCR CIRC LL_DMA_SetMode
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
ModeThis parameter can be one of the following values:
Return values:
None

Definition at line 602 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE void LL_DMA_SetPeriphAddress ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  PeriphAddress 
)

Set the Peripheral address.

Note:
Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only.
This API must not be called when the DMA channel is enabled.
Reference Manual to LL API cross reference:
CPAR PA LL_DMA_SetPeriphAddress
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
PeriphAddressBetween Min_Data = 0 and Max_Data = 0xFFFFFFFF
Return values:
None

Definition at line 987 of file stm32f1xx_ll_dma.h.

Referenced by LL_DMA_Init().

__STATIC_INLINE void LL_DMA_SetPeriphIncMode ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  PeriphOrM2MSrcIncMode 
)

Set Peripheral increment mode.

Reference Manual to LL API cross reference:
CCR PINC LL_DMA_SetPeriphIncMode
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
PeriphOrM2MSrcIncModeThis parameter can be one of the following values:
Return values:
None

Definition at line 647 of file stm32f1xx_ll_dma.h.

__STATIC_INLINE void LL_DMA_SetPeriphSize ( DMA_TypeDef *  DMAx,
uint32_t  Channel,
uint32_t  PeriphOrM2MSrcDataSize 
)

Set Peripheral size.

Reference Manual to LL API cross reference:
CCR PSIZE LL_DMA_SetPeriphSize
Parameters:
DMAxDMAx Instance
ChannelThis parameter can be one of the following values:
PeriphOrM2MSrcDataSizeThis parameter can be one of the following values:
Return values:
None

Definition at line 738 of file stm32f1xx_ll_dma.h.