TUKS MCU Introductory course / TUKS-COURSE-THERMOMETER

Fork of TUKS-COURSE-TIMER by TUKS MCU Introductory course

Embed: (wiki syntax)

« Back to documentation index

DMA Management

Functions

__STATIC_INLINE void LL_DAC_EnableDMAReq (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Enable DAC DMA transfer request of the selected channel.
__STATIC_INLINE void LL_DAC_DisableDMAReq (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Disable DAC DMA transfer request of the selected channel.
__STATIC_INLINE uint32_t LL_DAC_IsDMAReqEnabled (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get DAC DMA transfer request state of the selected channel.
__STATIC_INLINE uint32_t LL_DAC_DMA_GetRegAddr (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t Register)
 Function to help to configure DMA transfer to DAC: retrieve the DAC register address from DAC instance and a list of DAC registers intended to be used (most commonly) with DMA transfer.

Function Documentation

__STATIC_INLINE void LL_DAC_DisableDMAReq ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Disable DAC DMA transfer request of the selected channel.

Note:
To configure DMA source address (peripheral address), use function LL_DAC_DMA_GetRegAddr(). CR DMAEN1 LL_DAC_DisableDMAReq
CR DMAEN2 LL_DAC_DisableDMAReq
Parameters:
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:

  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2
Return values:
None

Definition at line 1250 of file stm32l4xx_ll_dac.h.

__STATIC_INLINE uint32_t LL_DAC_DMA_GetRegAddr ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  Register 
)

Function to help to configure DMA transfer to DAC: retrieve the DAC register address from DAC instance and a list of DAC registers intended to be used (most commonly) with DMA transfer.

Note:
These DAC registers are data holding registers: when DAC conversion is requested, DAC generates a DMA transfer request to have data available in DAC data holding registers.
This macro is intended to be used with LL DMA driver, refer to function "LL_DMA_ConfigAddresses()". Example: LL_DMA_ConfigAddresses(DMA1, LL_DMA_CHANNEL_1, (uint32_t)&< array or variable >, LL_DAC_DMA_GetRegAddr(DAC1, LL_DAC_CHANNEL_1, LL_DAC_DMA_REG_DATA_12BITS_RIGHT_ALIGNED), LL_DMA_DIRECTION_MEMORY_TO_PERIPH); DHR12R1 DACC1DHR LL_DAC_DMA_GetRegAddr
DHR12L1 DACC1DHR LL_DAC_DMA_GetRegAddr
DHR8R1 DACC1DHR LL_DAC_DMA_GetRegAddr
DHR12R2 DACC2DHR LL_DAC_DMA_GetRegAddr
DHR12L2 DACC2DHR LL_DAC_DMA_GetRegAddr
DHR8R2 DACC2DHR LL_DAC_DMA_GetRegAddr
Parameters:
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:

  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2
RegisterThis parameter can be one of the following values:

  • LL_DAC_DMA_REG_DATA_12BITS_RIGHT_ALIGNED
  • LL_DAC_DMA_REG_DATA_12BITS_LEFT_ALIGNED
  • LL_DAC_DMA_REG_DATA_8BITS_RIGHT_ALIGNED
Return values:
DACregister address

Definition at line 1305 of file stm32l4xx_ll_dac.h.

__STATIC_INLINE void LL_DAC_EnableDMAReq ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Enable DAC DMA transfer request of the selected channel.

Note:
To configure DMA source address (peripheral address), use function LL_DAC_DMA_GetRegAddr(). CR DMAEN1 LL_DAC_EnableDMAReq
CR DMAEN2 LL_DAC_EnableDMAReq
Parameters:
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:

  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2
Return values:
None

Definition at line 1232 of file stm32l4xx_ll_dac.h.

__STATIC_INLINE uint32_t LL_DAC_IsDMAReqEnabled ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get DAC DMA transfer request state of the selected channel.

(0: DAC DMA transfer request is disabled, 1: DAC DMA transfer request is enabled) CR DMAEN1 LL_DAC_IsDMAReqEnabled
CR DMAEN2 LL_DAC_IsDMAReqEnabled

Parameters:
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:

  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2
Return values:
Stateof bit (1 or 0).

Definition at line 1267 of file stm32l4xx_ll_dac.h.