Hal Drivers for L4

Dependents:   BSP OneHopeOnePrayer FINAL_AUDIO_RECORD AudioDemo

Fork of STM32L4xx_HAL_Driver by Senior Design: Sound Monitor

Embed: (wiki syntax)

« Back to documentation index

Configuration of ADC hierarchical scope: multimode

Configuration of ADC hierarchical scope: multimode
[ADC Exported Functions]

Functions

__STATIC_INLINE void LL_ADC_SetMultimode (ADC_Common_TypeDef *ADCxy_COMMON, uint32_t Multimode)
 Set ADC multimode configuration to operate in independent mode or multimode (for devices with several ADC instances).
__STATIC_INLINE uint32_t LL_ADC_GetMultimode (ADC_Common_TypeDef *ADCxy_COMMON)
 Get ADC multimode configuration to operate in independent mode or multimode (for devices with several ADC instances).
__STATIC_INLINE void LL_ADC_SetMultiDMATransfer (ADC_Common_TypeDef *ADCxy_COMMON, uint32_t DMATransfer)
 Set ADC multimode conversion data transfer: no transfer or transfer by DMA.
__STATIC_INLINE uint32_t LL_ADC_GetMultiDMATransfer (ADC_Common_TypeDef *ADCxy_COMMON)
 Get ADC multimode conversion data transfer: no transfer or transfer by DMA.
__STATIC_INLINE void LL_ADC_SetMultiTwoSamplingDelay (ADC_Common_TypeDef *ADCxy_COMMON, uint32_t TwoSamplingDelay)
 Set ADC multimode delay between 2 sampling phases.
__STATIC_INLINE uint32_t LL_ADC_GetMultiTwoSamplingDelay (ADC_Common_TypeDef *ADCxy_COMMON)
 Get ADC multimode delay between 2 sampling phases.

Function Documentation

__STATIC_INLINE uint32_t LL_ADC_GetMultiDMATransfer ( ADC_Common_TypeDef *  ADCxy_COMMON )

Get ADC multimode conversion data transfer: no transfer or transfer by DMA.

If ADC multimode transfer by DMA is not selected: each ADC uses its own DMA channel, with its individual DMA transfer settings. If ADC multimode transfer by DMA is selected: One DMA channel is used for both ADC (DMA of ADC master) Specifies the DMA requests mode: * Limited mode (One shot mode): DMA transfer requests are stopped when number of DMA data transfers (number of ADC conversions) is reached. This ADC mode is intended to be used with DMA mode non-circular. * Unlimited mode: DMA transfer requests are unlimited, whatever number of DMA data transfers (number of ADC conversions). This ADC mode is intended to be used with DMA mode circular.

Note:
If ADC DMA requests mode is set to unlimited and DMA is set to mode non-circular: when DMA transfers size will be reached, DMA will stop transfers of ADC conversions data ADC will raise an overrun error (overrun flag and interruption if enabled).
How to retrieve multimode conversion data: Whatever multimode transfer by DMA setting: using function LL_ADC_REG_ReadMultiConversionData32(). If ADC multimode transfer by DMA is selected: conversion data is a raw data with ADC master and slave concatenated. A macro is available to get the conversion data of ADC master or ADC slave: see helper macro __LL_ADC_MULTI_CONV_DATA_MASTER_SLAVE(). CCR MDMA LL_ADC_GetMultiDMATransfer
CCR DMACFG LL_ADC_GetMultiDMATransfer
Parameters:
ADCxy_COMMONADC common instance (can be set directly from CMSIS definition or by using helper macro __LL_ADC_COMMON_INSTANCE() )
Return values:
Returnedvalue can be one of the following values:

  • LL_ADC_MULTI_REG_DMA_EACH_ADC
  • LL_ADC_MULTI_REG_DMA_LIMIT_RES12_10B
  • LL_ADC_MULTI_REG_DMA_LIMIT_RES8_6B
  • LL_ADC_MULTI_REG_DMA_UNLMT_RES12_10B
  • LL_ADC_MULTI_REG_DMA_UNLMT_RES8_6B

Definition at line 4950 of file stm32l4xx_ll_adc.h.

__STATIC_INLINE uint32_t LL_ADC_GetMultimode ( ADC_Common_TypeDef *  ADCxy_COMMON )

Get ADC multimode configuration to operate in independent mode or multimode (for devices with several ADC instances).

If multimode configuration: the selected ADC instance is either master or slave depending on hardware. Refer to reference manual. CCR DUAL LL_ADC_GetMultimode

Parameters:
ADCxy_COMMONADC common instance (can be set directly from CMSIS definition or by using helper macro __LL_ADC_COMMON_INSTANCE() )
Return values:
Returnedvalue can be one of the following values:

  • LL_ADC_MULTI_INDEPENDENT
  • LL_ADC_MULTI_DUAL_REG_SIMULT
  • LL_ADC_MULTI_DUAL_REG_INTERL
  • LL_ADC_MULTI_DUAL_INJ_SIMULT
  • LL_ADC_MULTI_DUAL_INJ_ALTERN
  • LL_ADC_MULTI_DUAL_REG_SIM_INJ_SIM
  • LL_ADC_MULTI_DUAL_REG_SIM_INJ_ALT
  • LL_ADC_MULTI_DUAL_REG_INT_INJ_SIM

Definition at line 4853 of file stm32l4xx_ll_adc.h.

__STATIC_INLINE uint32_t LL_ADC_GetMultiTwoSamplingDelay ( ADC_Common_TypeDef *  ADCxy_COMMON )

Get ADC multimode delay between 2 sampling phases.

CCR DELAY LL_ADC_GetMultiTwoSamplingDelay

Parameters:
ADCxy_COMMONADC common instance (can be set directly from CMSIS definition or by using helper macro __LL_ADC_COMMON_INSTANCE() )
Return values:
Returnedvalue can be one of the following values:

  • LL_ADC_MULTI_TWOSMP_DELAY_1CYCLE
  • LL_ADC_MULTI_TWOSMP_DELAY_2CYCLES
  • LL_ADC_MULTI_TWOSMP_DELAY_3CYCLES
  • LL_ADC_MULTI_TWOSMP_DELAY_4CYCLES
  • LL_ADC_MULTI_TWOSMP_DELAY_5CYCLES
  • LL_ADC_MULTI_TWOSMP_DELAY_6CYCLES (1)
  • LL_ADC_MULTI_TWOSMP_DELAY_7CYCLES (1)
  • LL_ADC_MULTI_TWOSMP_DELAY_8CYCLES (2)
  • LL_ADC_MULTI_TWOSMP_DELAY_9CYCLES (2)
  • LL_ADC_MULTI_TWOSMP_DELAY_10CYCLES (2)
  • LL_ADC_MULTI_TWOSMP_DELAY_11CYCLES (3)
  • LL_ADC_MULTI_TWOSMP_DELAY_12CYCLES (3) (1) Parameter available only if ADC resolution is 12, 10 or 8 bits. (2) Parameter available only if ADC resolution is 12 or 10 bits. (3) Parameter available only if ADC resolution is 12 bits.

Definition at line 5016 of file stm32l4xx_ll_adc.h.

__STATIC_INLINE void LL_ADC_SetMultiDMATransfer ( ADC_Common_TypeDef *  ADCxy_COMMON,
uint32_t  DMATransfer 
)

Set ADC multimode conversion data transfer: no transfer or transfer by DMA.

If ADC multimode transfer by DMA is not selected: each ADC uses its own DMA channel, with its individual DMA transfer settings. If ADC multimode transfer by DMA is selected: One DMA channel is used for both ADC (DMA of ADC master) Specifies the DMA requests mode: * Limited mode (One shot mode): DMA transfer requests are stopped when number of DMA data transfers (number of ADC conversions) is reached. This ADC mode is intended to be used with DMA mode non-circular. * Unlimited mode: DMA transfer requests are unlimited, whatever number of DMA data transfers (number of ADC conversions). This ADC mode is intended to be used with DMA mode circular.

Note:
If ADC DMA requests mode is set to unlimited and DMA is set to mode non-circular: when DMA transfers size will be reached, DMA will stop transfers of ADC conversions data ADC will raise an overrun error (overrun flag and interruption if enabled).
How to retrieve multimode conversion data: Whatever multimode transfer by DMA setting: using function LL_ADC_REG_ReadMultiConversionData32(). If ADC multimode transfer by DMA is selected: conversion data is a raw data with ADC master and slave concatenated. A macro is available to get the conversion data of ADC master or ADC slave: see helper macro __LL_ADC_MULTI_CONV_DATA_MASTER_SLAVE().
On this STM32 family, setting of this feature is conditioned to ADC state: All ADC instances of the ADC common group must be disabled or enabled without conversion on going on group regular. CCR MDMA LL_ADC_SetMultiDMATransfer
CCR DMACFG LL_ADC_SetMultiDMATransfer
Parameters:
ADCxy_COMMONADC common instance (can be set directly from CMSIS definition or by using helper macro __LL_ADC_COMMON_INSTANCE() )
DMATransferThis parameter can be one of the following values:

  • LL_ADC_MULTI_REG_DMA_EACH_ADC
  • LL_ADC_MULTI_REG_DMA_LIMIT_RES12_10B
  • LL_ADC_MULTI_REG_DMA_LIMIT_RES8_6B
  • LL_ADC_MULTI_REG_DMA_UNLMT_RES12_10B
  • LL_ADC_MULTI_REG_DMA_UNLMT_RES8_6B
Return values:
None

Definition at line 4904 of file stm32l4xx_ll_adc.h.

__STATIC_INLINE void LL_ADC_SetMultimode ( ADC_Common_TypeDef *  ADCxy_COMMON,
uint32_t  Multimode 
)

Set ADC multimode configuration to operate in independent mode or multimode (for devices with several ADC instances).

If multimode configuration: the selected ADC instance is either master or slave depending on hardware. Refer to reference manual.

Note:
On this STM32 family, setting of this feature is conditioned to ADC state: All ADC instances of the ADC common group must be disabled. This check can be done with function LL_ADC_IsEnabled() for each ADC instance or by using helper macro __LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE(). CCR DUAL LL_ADC_SetMultimode
Parameters:
ADCxy_COMMONADC common instance (can be set directly from CMSIS definition or by using helper macro __LL_ADC_COMMON_INSTANCE() )
MultimodeThis parameter can be one of the following values:

  • LL_ADC_MULTI_INDEPENDENT
  • LL_ADC_MULTI_DUAL_REG_SIMULT
  • LL_ADC_MULTI_DUAL_REG_INTERL
  • LL_ADC_MULTI_DUAL_INJ_SIMULT
  • LL_ADC_MULTI_DUAL_INJ_ALTERN
  • LL_ADC_MULTI_DUAL_REG_SIM_INJ_SIM
  • LL_ADC_MULTI_DUAL_REG_SIM_INJ_ALT
  • LL_ADC_MULTI_DUAL_REG_INT_INJ_SIM
Return values:
None

Definition at line 4829 of file stm32l4xx_ll_adc.h.

__STATIC_INLINE void LL_ADC_SetMultiTwoSamplingDelay ( ADC_Common_TypeDef *  ADCxy_COMMON,
uint32_t  TwoSamplingDelay 
)

Set ADC multimode delay between 2 sampling phases.

Note:
The sampling delay range depends on ADC resolution:
  • ADC resolution 12 bits can have maximum delay of 12 cycles.
  • ADC resolution 10 bits can have maximum delay of 10 cycles.
  • ADC resolution 8 bits can have maximum delay of 8 cycles.
  • ADC resolution 6 bits can have maximum delay of 6 cycles.
On this STM32 family, setting of this feature is conditioned to ADC state: All ADC instances of the ADC common group must be disabled. This check can be done with function LL_ADC_IsEnabled() for each ADC instance or by using helper macro helper macro __LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE(). CCR DELAY LL_ADC_SetMultiTwoSamplingDelay
Parameters:
ADCxy_COMMONADC common instance (can be set directly from CMSIS definition or by using helper macro __LL_ADC_COMMON_INSTANCE() )
TwoSamplingDelayThis parameter can be one of the following values:

  • LL_ADC_MULTI_TWOSMP_DELAY_1CYCLE
  • LL_ADC_MULTI_TWOSMP_DELAY_2CYCLES
  • LL_ADC_MULTI_TWOSMP_DELAY_3CYCLES
  • LL_ADC_MULTI_TWOSMP_DELAY_4CYCLES
  • LL_ADC_MULTI_TWOSMP_DELAY_5CYCLES
  • LL_ADC_MULTI_TWOSMP_DELAY_6CYCLES (1)
  • LL_ADC_MULTI_TWOSMP_DELAY_7CYCLES (1)
  • LL_ADC_MULTI_TWOSMP_DELAY_8CYCLES (2)
  • LL_ADC_MULTI_TWOSMP_DELAY_9CYCLES (2)
  • LL_ADC_MULTI_TWOSMP_DELAY_10CYCLES (2)
  • LL_ADC_MULTI_TWOSMP_DELAY_11CYCLES (3)
  • LL_ADC_MULTI_TWOSMP_DELAY_12CYCLES (3) (1) Parameter available only if ADC resolution is 12, 10 or 8 bits. (2) Parameter available only if ADC resolution is 12 or 10 bits. (3) Parameter available only if ADC resolution is 12 bits.
Return values:
None

Definition at line 4989 of file stm32l4xx_ll_adc.h.