L4 HAL Drivers

Embed: (wiki syntax)

« Back to documentation index

ADC DMA management

ADC DMA management
[ADC Exported Functions]

Functions

__STATIC_INLINE uint32_t LL_ADC_DMA_GetRegAddr (ADC_TypeDef *ADCx, uint32_t Register)
 Function to help to configure DMA transfer from ADC: retrieve the ADC register address from ADC instance and a list of ADC registers intended to be used (most commonly) with DMA transfer.

Function Documentation

__STATIC_INLINE uint32_t LL_ADC_DMA_GetRegAddr ( ADC_TypeDef *  ADCx,
uint32_t  Register 
)

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

These ADC registers are data registers: when ADC conversion data is available in ADC data registers, ADC generates a DMA transfer request.

Note:
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, LL_ADC_DMA_GetRegAddr(ADC1, LL_ADC_DMA_REG_REGULAR_DATA), (uint32_t)&< array or variable >, LL_DMA_DIRECTION_PERIPH_TO_MEMORY);
For devices with several ADC: in multimode, some devices use a different data register outside of ADC instance scope (common data register). This macro manages this register difference, only ADC instance has to be set as parameter. DR RDATA LL_ADC_DMA_GetRegAddr
CDR RDATA_MST LL_ADC_DMA_GetRegAddr
CDR RDATA_SLV LL_ADC_DMA_GetRegAddr
Parameters:
ADCxADC instance
RegisterThis parameter can be one of the following values:

  • LL_ADC_DMA_REG_REGULAR_DATA
  • LL_ADC_DMA_REG_REGULAR_DATA_MULTI (1) (1) Available on devices with several ADC instances.
Return values:
ADCregister address

Definition at line 1875 of file stm32l4xx_ll_adc.h.