STM32F439xx HAL User Manual
Functions
Configuration of ADC hierarchical scope: channels
ADC Exported Functions

Functions

__STATIC_INLINE void LL_ADC_SetChannelSamplingTime (ADC_TypeDef *ADCx, uint32_t Channel, uint32_t SamplingTime)
 Set sampling time of the selected ADC channel Unit: ADC clock cycles.
__STATIC_INLINE uint32_t LL_ADC_GetChannelSamplingTime (ADC_TypeDef *ADCx, uint32_t Channel)
 Get sampling time of the selected ADC channel Unit: ADC clock cycles.

Function Documentation

__STATIC_INLINE uint32_t LL_ADC_GetChannelSamplingTime ( ADC_TypeDef *  ADCx,
uint32_t  Channel 
)

Get sampling time of the selected ADC channel Unit: ADC clock cycles.

Note:
On this device, sampling time is on channel scope: independently of channel mapped on ADC group regular or injected.
Conversion time is the addition of sampling time and processing time. Refer to reference manual for ADC processing time of this STM32 serie.
Reference Manual to LL API cross reference:
SMPR1 SMP18 LL_ADC_GetChannelSamplingTime
SMPR1 SMP17 LL_ADC_GetChannelSamplingTime
SMPR1 SMP16 LL_ADC_GetChannelSamplingTime
SMPR1 SMP15 LL_ADC_GetChannelSamplingTime
SMPR1 SMP14 LL_ADC_GetChannelSamplingTime
SMPR1 SMP13 LL_ADC_GetChannelSamplingTime
SMPR1 SMP12 LL_ADC_GetChannelSamplingTime
SMPR1 SMP11 LL_ADC_GetChannelSamplingTime
SMPR1 SMP10 LL_ADC_GetChannelSamplingTime
SMPR2 SMP9 LL_ADC_GetChannelSamplingTime
SMPR2 SMP8 LL_ADC_GetChannelSamplingTime
SMPR2 SMP7 LL_ADC_GetChannelSamplingTime
SMPR2 SMP6 LL_ADC_GetChannelSamplingTime
SMPR2 SMP5 LL_ADC_GetChannelSamplingTime
SMPR2 SMP4 LL_ADC_GetChannelSamplingTime
SMPR2 SMP3 LL_ADC_GetChannelSamplingTime
SMPR2 SMP2 LL_ADC_GetChannelSamplingTime
SMPR2 SMP1 LL_ADC_GetChannelSamplingTime
SMPR2 SMP0 LL_ADC_GetChannelSamplingTime
Parameters:
ADCxADC instance
ChannelThis parameter can be one of the following values: (1) On STM32F4, parameter available only on ADC instance: ADC1.
(2) On devices STM32F42x and STM32F43x, limitation: this internal channel is shared between temperature sensor and Vbat, only 1 measurement path must be enabled.
Return values:
Returnedvalue can be one of the following values:

Definition at line 3263 of file stm32f4xx_ll_adc.h.

References __ADC_MASK_SHIFT, __ADC_PTR_REG_OFFSET, ADC_CHANNEL_SMPRX_REGOFFSET_MASK, and ADC_CHANNEL_SMPx_BITOFFSET_MASK.

__STATIC_INLINE void LL_ADC_SetChannelSamplingTime ( ADC_TypeDef *  ADCx,
uint32_t  Channel,
uint32_t  SamplingTime 
)

Set sampling time of the selected ADC channel Unit: ADC clock cycles.

Note:
On this device, sampling time is on channel scope: independently of channel mapped on ADC group regular or injected.
In case of internal channel (VrefInt, TempSensor, ...) to be converted: sampling time constraints must be respected (sampling time can be adjusted in function of ADC clock frequency and sampling time setting). Refer to device datasheet for timings values (parameters TS_vrefint, TS_temp, ...).
Conversion time is the addition of sampling time and processing time. Refer to reference manual for ADC processing time of this STM32 serie.
In case of ADC conversion of internal channel (VrefInt, temperature sensor, ...), a sampling time minimum value is required. Refer to device datasheet.
Reference Manual to LL API cross reference:
SMPR1 SMP18 LL_ADC_SetChannelSamplingTime
SMPR1 SMP17 LL_ADC_SetChannelSamplingTime
SMPR1 SMP16 LL_ADC_SetChannelSamplingTime
SMPR1 SMP15 LL_ADC_SetChannelSamplingTime
SMPR1 SMP14 LL_ADC_SetChannelSamplingTime
SMPR1 SMP13 LL_ADC_SetChannelSamplingTime
SMPR1 SMP12 LL_ADC_SetChannelSamplingTime
SMPR1 SMP11 LL_ADC_SetChannelSamplingTime
SMPR1 SMP10 LL_ADC_SetChannelSamplingTime
SMPR2 SMP9 LL_ADC_SetChannelSamplingTime
SMPR2 SMP8 LL_ADC_SetChannelSamplingTime
SMPR2 SMP7 LL_ADC_SetChannelSamplingTime
SMPR2 SMP6 LL_ADC_SetChannelSamplingTime
SMPR2 SMP5 LL_ADC_SetChannelSamplingTime
SMPR2 SMP4 LL_ADC_SetChannelSamplingTime
SMPR2 SMP3 LL_ADC_SetChannelSamplingTime
SMPR2 SMP2 LL_ADC_SetChannelSamplingTime
SMPR2 SMP1 LL_ADC_SetChannelSamplingTime
SMPR2 SMP0 LL_ADC_SetChannelSamplingTime
Parameters:
ADCxADC instance
ChannelThis parameter can be one of the following values: (1) On STM32F4, parameter available only on ADC instance: ADC1.
(2) On devices STM32F42x and STM32F43x, limitation: this internal channel is shared between temperature sensor and Vbat, only 1 measurement path must be enabled.
SamplingTimeThis parameter can be one of the following values:
Return values:
None

Definition at line 3186 of file stm32f4xx_ll_adc.h.

References __ADC_MASK_SHIFT, __ADC_PTR_REG_OFFSET, ADC_CHANNEL_SMPRX_REGOFFSET_MASK, and ADC_CHANNEL_SMPx_BITOFFSET_MASK.