LL ADC Functions

LL ADC Functions

group ADC_LL_Exported_Functions

Functions

void LL_ADC_SetSamplingTimeCommonChannels ( ADC_TypeDef * p_adc , uint32_t sampling_time_y , uint32_t sampling_time )

Set sampling time common to a group of channels.

Reference Manual to LL API cross reference (Register Field Functions)

SMPR SMP1 LL_ADC_SetSamplingTimeCommonChannels

SMPR SMP2 LL_ADC_SetSamplingTimeCommonChannels

Note

Unit: ADC clock cycles.

Note

On this STM32 series, sampling time scope is on ADC instance: Sampling time common to all channels. (on some other STM32 families, sampling time is channel wise)

Note

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, …).

Note

Conversion time is the addition of sampling time and processing time. On this STM32 series, ADC processing time is:

  • 12.5 ADC clock cycles at ADC resolution 12 bits

  • 10.5 ADC clock cycles at ADC resolution 10 bits

  • 8.5 ADC clock cycles at ADC resolution 8 bits

  • 6.5 ADC clock cycles at ADC resolution 6 bits

Note

In case of ADC conversion of internal channel (VrefInt, temperature sensor, …), a sampling time minimum value is required. Refer to device datasheet.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Note

Applicable only on ADC4 instance

Parameters :
uint32_t LL_ADC_GetSamplingTimeCommonChannels ( const ADC_TypeDef * p_adc , uint32_t sampling_time_y )

Get sampling time common to a group of channels.

Reference Manual to LL API cross reference (Register Field Functions)

SMPR SMP1 LL_ADC_GetSamplingTimeCommonChannels

SMPR SMP2 LL_ADC_GetSamplingTimeCommonChannels

Note

Unit: ADC clock cycles.

Note

On this STM32 series, sampling time scope is on ADC instance: Sampling time common to all channels. (on some other STM32 families, sampling time is channel wise)

Note

Conversion time is the addition of sampling time and processing time. Refer to reference manual for ADC processing time of this STM32 series.

Parameters :
Return values :

Returned – value can be one of the following values:

ADC DMA management

group ADC_LL_EF_DMA_Management

Functions

uint32_t LL_ADC_DMA_GetRegAddr ( const ADC_TypeDef * p_adc , uint32_t register_sel )

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.

Reference Manual to LL API cross reference (Register Field Functions)

DR RDATA LL_ADC_DMA_GetRegAddr

CDR RDATA_MST LL_ADC_DMA_GetRegAddr

CDR RDATA_SLV LL_ADC_DMA_GetRegAddr

CDR2 RDATA_ALT LL_ADC_DMA_GetRegAddr

Note

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);

Note

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.

Parameters :
Return values :

ADC – register address

Configuration of ADC hierarchical scope:

group ADC_LL_EF_Configuration_ADC_Common

common to several ADC instances

Functions

void LL_ADC_SetCommonClock ( ADC_Common_TypeDef * p_adc_common , uint32_t common_clock )

Set parameter common to several ADC: Clock source and prescaler.

Reference Manual to LL API cross reference (Register Field Functions)

CCR CKMODE LL_ADC_SetCommonClock

CCR PRESC LL_ADC_SetCommonClock

Note

On this STM32 series, if ADC group injected is used, some clock ratio constraints between ADC clock and AHB clock must be respected. Refer to reference manual.

Note

On this STM32 series, 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.

Parameters :
uint32_t LL_ADC_GetCommonClock ( const ADC_Common_TypeDef * p_adc_common )

Get parameter common to several ADC: Clock source and prescaler.

Reference Manual to LL API cross reference (Register Field Functions)

CCR CKMODE LL_ADC_GetCommonClock

CCR PRESC LL_ADC_GetCommonClock

Note

To convert prescaler to decimal value, use helper macro LL_ADC_CLOCK_PRESC_TO_DECIMAL_NB()

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

Returned – value can be one of the following values:

void LL_ADC_SetCommonPathInternalChAdd ( ADC_Common_TypeDef * p_adc_common , uint32_t path_internal )

Set parameter common to several ADC: measurement path to internal channels (VrefInt, temperature sensor, …). Add paths to the current configuration.

Reference Manual to LL API cross reference (Register Field Functions)

CCR VREFEN LL_ADC_SetCommonPathInternalChAdd

CCR VSENSEEN LL_ADC_SetCommonPathInternalChAdd

CCR VBATEN LL_ADC_SetCommonPathInternalChAdd

Note

One or several values can be selected. Example: (LL_ADC_PATH_INTERNAL_VREFINT | LL_ADC_PATH_INTERNAL_TEMPSENSOR)

Note

Stabilization time of measurement path to internal channel: After enabling internal paths, before starting ADC conversion, a delay is required for internal voltage reference and temperature sensor stabilization time. Refer to device datasheet. Refer to literal LL_ADC_DELAY_VREFINT_STAB_US . Refer to literals LL_ADC_DELAY_TEMPSENSOR_STAB_US ,

Note

ADC internal channel sampling time constraint: For ADC conversion of internal channels, a sampling time minimum value is required. Refer to device datasheet.

Note

On this STM32 series, 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.

Parameters :
void LL_ADC_SetCommonPathInternalChRem ( ADC_Common_TypeDef * p_adc_common , uint32_t path_internal )

Set parameter common to several ADC: measurement path to internal channels (VrefInt, temperature sensor, …). Remove paths to the current configuration.

Reference Manual to LL API cross reference (Register Field Functions)

CCR VREFEN LL_ADC_SetCommonPathInternalChRem

CCR VSENSEEN LL_ADC_SetCommonPathInternalChRem

CCR VBATEN LL_ADC_SetCommonPathInternalChRem

Note

One or several values can be selected. Example: (LL_ADC_PATH_INTERNAL_VREFINT | LL_ADC_PATH_INTERNAL_TEMPSENSOR)

Note

On this STM32 series, 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.

Parameters :
void LL_ADC_SetCommonPathInternalCh ( ADC_Common_TypeDef * p_adc_common , uint32_t path_internal )

Set parameter common to several ADC: measurement path to internal channels (VrefInt, temperature sensor, …).

Reference Manual to LL API cross reference (Register Field Functions)

CCR VREFEN LL_ADC_SetCommonPathInternalCh

CCR VSENSEEN LL_ADC_SetCommonPathInternalCh

CCR VBATEN LL_ADC_SetCommonPathInternalCh

Note

One or several values can be selected. Example: (LL_ADC_PATH_INTERNAL_VREFINT | LL_ADC_PATH_INTERNAL_TEMPSENSOR)

Note

Stabilization time of measurement path to internal channel: After enabling internal paths, before starting ADC conversion, a delay is required for internal voltage reference and temperature sensor stabilization time. Refer to device datasheet. Refer to literal LL_ADC_DELAY_VREFINT_STAB_US . Refer to literal LL_ADC_DELAY_TEMPSENSOR_STAB_US .

Note

ADC internal channel sampling time constraint: For ADC conversion of internal channels, a sampling time minimum value is required. Refer to device datasheet.

Note

On this STM32 series, 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.

Parameters :
uint32_t LL_ADC_GetCommonPathInternalCh ( const ADC_Common_TypeDef * p_adc_common )

Get parameter common to several ADC: measurement path to internal channels (VrefInt, temperature sensor, …).

Reference Manual to LL API cross reference (Register Field Functions)

CCR VREFEN LL_ADC_GetCommonPathInternalCh

CCR VSENSEEN LL_ADC_GetCommonPathInternalCh

CCR VBATEN LL_ADC_GetCommonPathInternalCh

Note

One or several values can be selected. Example: (LL_ADC_PATH_INTERNAL_VREFINT | LL_ADC_PATH_INTERNAL_TEMPSENSOR)

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

Returned – value can be a combination of the following values:

Configuration of ADC hierarchical scope: ADC instance

group ADC_LL_EF_Configuration_ADC_Instance

Functions

void LL_ADC_SetPathInternalCh ( ADC_TypeDef * p_adc , uint32_t path_internal )

Set parameter on ADC instance scope: measurement path to internal channels. Configure all paths (overwrite current configuration).

Reference Manual to LL API cross reference (Register Field Functions)

OR CHN21SEL LL_ADC_SetPathInternalCh

Note

Stabilization time of measurement path to internal channel: After enabling internal paths, before starting ADC conversion, a delay is required required for analog stabilization. Refer to device datasheet.

Note

ADC internal channel sampling time constraint: For ADC conversion of internal channels, a sampling time minimum value is required. Refer to device datasheet.

Parameters :
void LL_ADC_SetPathInternalChAdd ( ADC_TypeDef * p_adc , uint32_t path_internal )

Set parameter on ADC instance scope: measurement path to internal channels. Add paths to the current configuration.

Reference Manual to LL API cross reference (Register Field Functions)

OR CHN21SEL LL_ADC_SetPathInternalChAdd

Note

Stabilization time of measurement path to internal channel: After enabling internal paths, before starting ADC conversion, a delay is required required for analog stabilization. Refer to device datasheet.

Note

ADC internal channel sampling time constraint: For ADC conversion of internal channels, a sampling time minimum value is required. Refer to device datasheet.

Parameters :
void LL_ADC_SetPathInternalChRem ( ADC_TypeDef * p_adc , uint32_t path_internal )

Set parameter on ADC instance scope: measurement path to internal channels Remove paths to the current configuration.

Reference Manual to LL API cross reference (Register Field Functions)

OR CHN21SEL LL_ADC_SetPathInternalChRem

Note

Stabilization time of measurement path to internal channel: After enabling internal paths, before starting ADC conversion, a delay is required required for analog stabilization. Refer to device datasheet.

Note

ADC internal channel sampling time constraint: For ADC conversion of internal channels, a sampling time minimum value is required. Refer to device datasheet.

Parameters :
uint32_t LL_ADC_GetPathInternalCh ( const ADC_TypeDef * p_adc )

Get parameter on ADC instance scope: measurement path to internal channels.

Reference Manual to LL API cross reference (Register Field Functions)

OR CHN21SEL LL_ADC_GetPathInternalCh

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

(1): Specific to ADC instance: ADC4

void LL_ADC_SetCalibrationOffsetFactor ( ADC_TypeDef * p_adc , uint32_t input_mode , uint32_t calibration_factor )

Set ADC calibration factor in the mode single-ended or differential (for devices with differential mode available).

Note

This function is intended to set calibration parameters without having to perform a new calibration using LL_ADC_StartCalibration() .

Note

For devices with differential mode available: Calibration of offset is specific to each of single-ended and differential modes (calibration factor must be specified for each of these differential modes, if used afterwards and if the application requires their calibration). Calibration of linearity is common to both single-ended and differential modes (calibration factor can be specified only once).

Note

In case of setting calibration factors of both modes single ended and differential (parameter LL_ADC_IN_SINGLE_DIFF ): both calibration factors must be concatenated. To perform this processing, use helper macro LL_ADC_CALIB_FACTOR_SINGLE_DIFF() .

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be enabled, without calibration on going, without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_GetCalibrationOffsetFactor ( ADC_TypeDef * p_adc , uint32_t input_mode )

Get ADC calibration factor in the mode single-ended or differential (for devices with differential mode available).

Note

Calibration factors are set by hardware after performing a calibration run using function LL_ADC_StartCalibration() .

Note

For devices with differential mode available: Calibration of offset is specific to each of single-ended and differential modes Calibration of linearity is common to both single-ended and differential modes

Parameters :
Return values :

Value – between Min_Data=0x0000 and Max_Data=0xFFFF

void LL_ADC_SetCalibrationFactorsBuffer ( ADC_TypeDef * p_adc , const uint32_t * p_calib_factors_buffer )

Set ADC calibration factors buffer (specific STM32U5, ADC instances: ADC1, ADC2)

Reference Manual to LL API cross reference (Register Field Functions)

CR CALINDEX LL_ADC_SetCalibrationFactorsBuffer

CALFACT LATCH_COEF LL_ADC_SetCalibrationFactorsBuffer

Note

Refer to ref manual for calibration factors management procedure.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be enabled, without calibration on going, without conversion on going on group regular.

Parameters :
  • p_adc – Pointer to ADC instance

  • p_calib_factors_buffer – Pointer to array of calibration factors, array size 9 elements

void LL_ADC_GetCalibrationFactorsBuffer ( ADC_TypeDef * p_adc , uint32_t * p_calib_factors_buffer )

Get ADC calibration factors buffer (specific STM32U5, ADC instances: ADC1, ADC2)

Reference Manual to LL API cross reference (Register Field Functions)

CR CALINDEX LL_ADC_GetCalibrationFactorsBuffer

CALFACT CAPTURE_COEF LL_ADC_GetCalibrationFactorsBuffer

Note

Refer to ref manual for calibration factors management procedure.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be enabled, without calibration on going, without conversion on going on group regular.

Parameters :
  • p_adc – Pointer to ADC instance

  • p_calib_factors_buffer – Pointer to array of calibration factors, array size 9 elements

void LL_ADC_SetCalibrationLinearFactor ( ADC_TypeDef * p_adc , uint32_t linearity_word , uint32_t calibration_factor )

Set ADC Linear calibration factor in the mode single-ended.

Reference Manual to LL API cross reference (Register Field Functions)

CALFACT2 LINCALFACT LL_ADC_SetCalibrationLinearFactor

CALFACT2 LINCALFACT LL_ADC_SetCalibrationLinearFactor

Note

This function is intended to set linear calibration parameters without having to perform a new calibration using LL_ADC_StartCalibration() .

Note

On STM32U5, this feature is available on ADC instances: ADC1, ADC2.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be enabled, without calibration on going, without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_GetCalibrationLinearFactor ( ADC_TypeDef * p_adc , uint32_t linearity_word )

Get ADC Linear calibration factor in the mode single-ended.

Reference Manual to LL API cross reference (Register Field Functions)

CALFACT2 LINCALFACT LL_ADC_GetCalibrationLinearFactor

CALFACT2 LINCALFACT LL_ADC_GetCalibrationLinearFactor

Note

Calibration factors are set by hardware after performing a calibration run using function LL_ADC_StartCalibration() .

Note

On STM32U5, this feature is available on ADC instances: ADC1, ADC2.

Parameters :
Return values :

Value – between Min_Data=0x00 and Max_Data=0x3FFFFFFF

void LL_ADC_SetCalibrationExtended ( ADC_TypeDef * p_adc )

Set ADC extended calibration (specific STM32U5, ADC instances: ADC1, ADC2)

Reference Manual to LL API cross reference (Register Field Functions)

CR CALINDEX LL_ADC_SetCalibrationExtended

CALFACT LATCH_COEF LL_ADC_SetCalibrationExtended

Note

Extended calibration not available on all devices. Refer to ref manual for calibration factors management procedure.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be ADC enabled.

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_SetResolution ( ADC_TypeDef * p_adc , uint32_t resolution )

Set ADC resolution. Refer to reference manual for alignments formats dependencies to ADC resolutions.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR RES LL_ADC_SetResolution

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on either groups regular or injected.

Parameters :
uint32_t LL_ADC_GetResolution ( const ADC_TypeDef * p_adc )

Get ADC resolution. Refer to reference manual for alignments formats dependencies to ADC resolutions.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR RES LL_ADC_GetResolution

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_SetDataAlignment ( ADC_TypeDef * p_adc , uint32_t data_alignment )

Set ADC conversion data alignment.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR1 ALIGN LL_ADC_SetDataAlignment

Note

Refer to reference manual for alignments formats dependencies to ADC resolutions.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_GetDataAlignment ( const ADC_TypeDef * p_adc )

Get ADC conversion data alignment.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR1 ALIGN LL_ADC_GetDataAlignment

Note

Refer to reference manual for alignments formats dependencies to ADC resolutions.

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_SetLeftBitShift ( ADC_TypeDef * p_adc , uint32_t left_bit_shift )

Set ADC conversion data left bit shift.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 LSHIFT LL_ADC_SetLeftBitShift

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_GetLeftBitShift ( const ADC_TypeDef * p_adc )

Get ADC conversion data left bit shift.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 LSHIFT LL_ADC_GetLeftBitShift

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_SetLowPowerMode ( ADC_TypeDef * p_adc , uint32_t low_power_mode )

Set ADC low power mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR AUTDLY LL_ADC_SetLowPowerMode

Note

Description of ADC low power modes:

  • ADC low power mode “auto wait”: Dynamic low power mode, ADC conversions occurrences are limited to the minimum necessary in order to reduce power consumption. New ADC conversion starts only when the previous unitary conversion data (for ADC group regular) or previous sequence conversions data (for ADC group injected) has been retrieved by user software. In the meantime, ADC remains idle: does not performs any other conversion. This mode allows to automatically adapt the ADC conversions triggers to the speed of the software that reads the data. Moreover, this avoids risk of overrun for low frequency applications. How to use this low power mode:

    • It is not recommended to use with interruption or DMA since these modes have to clear immediately the EOC flag (by CPU to free the IRQ pending event or by DMA). Auto wait will work but fort a very short time, discarding its intended benefit (except specific case of high load of CPU or DMA transfers which can justify usage of auto wait).

    • Do use with polling: 1. Start conversion,

      1. Later on, when conversion data is needed: poll for end of conversion to ensure that conversion is completed and retrieve ADC conversion data. This will trig another ADC conversion start.

  • ADC low power mode “auto power-off” (feature available on this device if parameter LL_ADC_LP_AUTOPOWEROFF is available): the ADC automatically powers-off after a conversion and automatically wakes up when a new conversion is triggered (with startup time between trigger and start of sampling). This feature can be combined with low power mode “auto wait”.

Note

With ADC low power mode “auto wait”, the ADC conversion data read is corresponding to previous ADC conversion start, independently of delay during which ADC was idle. Therefore, the ADC conversion data can be outdated: does not correspond to the current voltage level on the selected ADC channel.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on either groups regular or injected.

Parameters :
uint32_t LL_ADC_GetLowPowerMode ( const ADC_TypeDef * p_adc )

Get ADC low power mode:

Reference Manual to LL API cross reference (Register Field Functions)

CFGR AUTDLY LL_ADC_GetLowPowerMode

Note

Description of ADC low power modes:

  • ADC low power mode “auto wait”: Dynamic low power mode, ADC conversions occurrences are limited to the minimum necessary in order to reduce power consumption. New ADC conversion starts only when the previous unitary conversion data (for ADC group regular) or previous sequence conversions data (for ADC group injected) has been retrieved by user software. In the meantime, ADC remains idle: does not performs any other conversion. This mode allows to automatically adapt the ADC conversions triggers to the speed of the software that reads the data. Moreover, this avoids risk of overrun for low frequency applications. How to use this low power mode:

    • It is not recommended to use with interruption or DMA since these modes have to clear immediately the EOC flag (by CPU to free the IRQ pending event or by DMA). Auto wait will work but fort a very short time, discarding its intended benefit (except specific case of high load of CPU or DMA transfers which can justify usage of auto wait).

    • Do use with polling: 1. Start conversion,

      1. Later on, when conversion data is needed: poll for end of conversion to ensure that conversion is completed and retrieve ADC conversion data. This will trig another ADC conversion start.

  • ADC low power mode “auto power-off” (feature available on this device if parameter LL_ADC_LP_AUTOPOWEROFF is available): the ADC automatically powers-off after a conversion and automatically wakes up when a new conversion is triggered (with startup time between trigger and start of sampling). This feature can be combined with low power mode “auto wait”.

Note

With ADC low power mode “auto wait”, the ADC conversion data read is corresponding to previous ADC conversion start, independently of delay during which ADC was idle. Therefore, the ADC conversion data can be outdated: does not correspond to the current voltage level on the selected ADC channel.

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_SetGainCompensation ( ADC_TypeDef * p_adc , uint32_t gain_compensation )

Set ADC gain compensation applied to raw converted data.

Reference Manual to LL API cross reference (Register Field Functions)

GCOMP GCOMPCOEFF LL_ADC_SetGainCompensation

CFGR2 GCOMP LL_ADC_SetGainCompensation

Note

ADC conversion raw data is computed with gain value using the formula: DATA = DATA(raw) * (gain compensation coef) / LL_ADC_GAIN_COMPENSATION_DIV Therefore, value 4096 corresponds to unitary gain gain (gain compensation disabled)

Note

Gain compensation is applied to all ADC conversions (independently of groups or channels).

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on either groups regular or injected.

Parameters :
  • p_adc – Pointer to ADC instance

  • gain_compensation – Gain compensation enable state and value. Value between Min_Data=0 and Max_Data=16393

uint32_t LL_ADC_GetGainCompensation ( const ADC_TypeDef * p_adc )

Get the ADC gain compensation value.

Reference Manual to LL API cross reference (Register Field Functions)

GCOMP GCOMPCOEFF LL_ADC_GetGainCompensation

CFGR2 GCOMP LL_ADC_GetGainCompensation

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value between Min_Data=0 and Max_Data=16383

Functions

void LL_ADC_SetOffset ( ADC_TypeDef * p_adc , uint32_t offset_y , uint32_t channel , uint32_t offset_level )

Set ADC selected offset number 1, 2, 3 or 4.

Reference Manual to LL API cross reference (Register Field Functions)

OFR1 OFFSET1_CH LL_ADC_SetOffset

OFR1 OFFSET1 LL_ADC_SetOffset

OFR1 OFFSET1_EN LL_ADC_SetOffset

OFR2 OFFSET2_CH LL_ADC_SetOffset

OFR2 OFFSET2 LL_ADC_SetOffset

OFR2 OFFSET2_EN LL_ADC_SetOffset

OFR3 OFFSET3_CH LL_ADC_SetOffset

OFR3 OFFSET3 LL_ADC_SetOffset

OFR3 OFFSET3_EN LL_ADC_SetOffset

OFR4 OFFSET4_CH LL_ADC_SetOffset

OFR4 OFFSET4 LL_ADC_SetOffset

OFR4 OFFSET4_EN LL_ADC_SetOffset

Note

This function set the 2 items of offset configuration:

  • ADC channel to which the offset programmed will be applied (independently of channel mapped on ADC group regular or group injected)

  • Offset level (offset to be computed from the raw converted data).

Note

Offset value can be subtracted or added using separate sign configuration, refer to LL_ADC_SetOffsetSign() .

Note

In case of ADC resolution different of default resolution (14 bit) offset level data requires a specific shift. Use helper macro LL_ADC_OFFSET_SET_LEVEL_RES() .

Note

If a channel is mapped on several offsets numbers, only the offset with the lowest value is considered for the subtraction.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on either groups regular or injected.

Note

On STM32U5, some fast channels are available: fast analog inputs coming from GPIO pads (ADC_IN0..5).

Parameters :
uint32_t LL_ADC_GetOffsetChannel ( const ADC_TypeDef * p_adc , uint32_t offset_y )

Get for the ADC selected offset number 1, 2, 3 or 4: Channel to which the offset programmed will be applied (independently of channel mapped on ADC group regular or group injected)

Reference Manual to LL API cross reference (Register Field Functions)

OFR1 OFFSET1_CH LL_ADC_GetOffsetChannel

OFR2 OFFSET2_CH LL_ADC_GetOffsetChannel

OFR3 OFFSET3_CH LL_ADC_GetOffsetChannel

OFR4 OFFSET4_CH LL_ADC_GetOffsetChannel

Note

Usage of the returned channel number:

  • To reinject this channel into another function LL_ADC_xxx: the returned channel number is only partly formatted on definition of literals LL_ADC_CHANNEL_x. Therefore, it has to be compared with parts of literals LL_ADC_CHANNEL_x or using helper macro LL_ADC_CHANNEL_TO_DECIMAL_NB() . Then the selected literal LL_ADC_CHANNEL_x can be used as parameter for another function.

  • To get the channel number in decimal format: process the returned value with the helper macro LL_ADC_CHANNEL_TO_DECIMAL_NB() .

Note

On STM32U5, some fast channels are available: fast analog inputs coming from GPIO pads (ADC_IN0..5).

Parameters :
Return values :

Returned – value corresponds to one of literals LL_ADC_CHANNEL_x with specific formatting, refer to note of this function.

uint32_t LL_ADC_GetOffsetLevel ( const ADC_TypeDef * p_adc , uint32_t offset_y )

Get for the ADC selected offset number 1, 2, 3 or 4: Offset level (offset to be computed from the raw converted data).

Reference Manual to LL API cross reference (Register Field Functions)

OFR1 OFFSET1 LL_ADC_GetOffsetLevel

OFR2 OFFSET2 LL_ADC_GetOffsetLevel

OFR3 OFFSET3 LL_ADC_GetOffsetLevel

OFR4 OFFSET4 LL_ADC_GetOffsetLevel

Note

Offset value can be subtracted or added using separate sign configuration, refer to LL_ADC_SetOffsetSign() .

Note

In case of ADC resolution different of default resolution (14 bit) offset level data requires a specific shift. Use helper macro LL_ADC_OFFSET_GET_LEVEL_RES() .

Parameters :
Return values :

Value – between Min_Data=0x00000000 and Max_Data=0x01FFFFFF

void LL_ADC_SetOffsetSign ( ADC_TypeDef * p_adc , uint32_t offset_y , uint32_t offset_sign )

Set for the ADC selected offset number 1, 2, 3 or 4: choose offset sign.

Reference Manual to LL API cross reference (Register Field Functions)

OFR1 OFFSETPOS LL_ADC_SetOffsetSign

OFR2 OFFSETPOS LL_ADC_SetOffsetSign

OFR3 OFFSETPOS LL_ADC_SetOffsetSign

OFR4 OFFSETPOS LL_ADC_SetOffsetSign

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on either groups regular or injected.

Parameters :
uint32_t LL_ADC_GetOffsetSign ( const ADC_TypeDef * p_adc , uint32_t offset_y )

Get for the ADC selected offset number 1, 2, 3 or 4: offset sign if positive or negative.

Reference Manual to LL API cross reference (Register Field Functions)

OFR1 OFFSETPOS LL_ADC_GetOffsetSign

OFR2 OFFSETPOS LL_ADC_GetOffsetSign

OFR3 OFFSETPOS LL_ADC_GetOffsetSign

OFR4 OFFSETPOS LL_ADC_GetOffsetSign

Parameters :
Return values :

Returned – value can be one of the following values:

void LL_ADC_SetOffsetSignedSaturation ( ADC_TypeDef * p_adc , uint32_t offset_y , uint32_t offset_signed_saturation )

Set Signed saturation for the ADC selected offset number 1, 2, 3 or 4: signed offset saturation if enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

OFR1 SSAT LL_ADC_SetOffsetSignedSaturation

OFR2 SSAT LL_ADC_SetOffsetSignedSaturation

OFR3 SSAT LL_ADC_SetOffsetSignedSaturation

OFR4 SSAT LL_ADC_SetOffsetSignedSaturation

Parameters :
uint32_t LL_ADC_GetOffsetSignedSaturation ( const ADC_TypeDef * p_adc , uint32_t offset_y )

Get Signed saturation for the ADC selected offset number 1, 2, 3 or 4: signed offset saturation if enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

OFR1 SSAT LL_ADC_GetOffsetSignedSaturation

OFR2 SSAT LL_ADC_GetOffsetSignedSaturation

OFR3 SSAT LL_ADC_GetOffsetSignedSaturation

OFR4 SSAT LL_ADC_GetOffsetSignedSaturation

Parameters :
Return values :

Returned – value can be one of the following values:

void LL_ADC_SetOffsetUnsignedSaturation ( ADC_TypeDef * p_adc , uint32_t offset_y , uint32_t offset_unsigned_saturation )

Set Unsigned saturation for the ADC selected offset number 1, 2, 3 or 4: signed offset saturation if enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

OFR1 USAT LL_ADC_SetOffsetUnsignedSaturation

OFR2 USAT LL_ADC_SetOffsetUnsignedSaturation

OFR3 USAT LL_ADC_SetOffsetUnsignedSaturation

OFR4 USAT LL_ADC_SetOffsetUnsignedSaturation

Parameters :
uint32_t LL_ADC_GetOffsetUnsignedSaturation ( const ADC_TypeDef * p_adc , uint32_t offset_y )

Get Unsigned saturation for the ADC selected offset number 1, 2, 3 or 4: signed offset saturation if enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

OFR1 USAT LL_ADC_GetOffsetUnsignedSaturation

OFR2 USAT LL_ADC_GetOffsetUnsignedSaturation

OFR3 USAT LL_ADC_GetOffsetUnsignedSaturation

OFR4 USAT LL_ADC_GetOffsetUnsignedSaturation

Parameters :
Return values :

Returned – value can be one of the following values:

Configuration of ADC hierarchical scope: group regular

group ADC_LL_EF_Configuration_ADC_Group_Regular

Functions

void LL_ADC_REG_SetTriggerSource ( ADC_TypeDef * p_adc , uint32_t trigger_source )

Set ADC group regular conversion trigger source: internal (SW start) or from external peripheral (timer event, external interrupt line).

Reference Manual to LL API cross reference (Register Field Functions)

CFGR EXTSEL LL_ADC_REG_SetTriggerSource

CFGR EXTEN LL_ADC_REG_SetTriggerSource

Note

On this STM32 series, setting trigger source to external trigger also set trigger polarity to rising edge (default setting for compatibility with some ADC on other STM32 families having this setting set by HW default value). In case of need to modify trigger edge, use function LL_ADC_REG_SetTriggerEdge() .

Note

Availability of parameters of trigger sources from timer depends on timers availability on the selected device.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_REG_GetTriggerSource ( const ADC_TypeDef * p_adc )

Get ADC group regular conversion trigger source: internal (SW start) or from external peripheral (timer event, external interrupt line).

Reference Manual to LL API cross reference (Register Field Functions)

CFGR EXTSEL LL_ADC_REG_GetTriggerSource

CFGR EXTEN LL_ADC_REG_GetTriggerSource

Note

To determine whether group regular trigger source is internal (SW start) or external, without detail of which peripheral is selected as external trigger, (equivalent to “if(LL_ADC_REG_GetTriggerSource(ADC1) == LL_ADC_REG_TRIG_SOFTWARE)”) use function LL_ADC_REG_IsTriggerSourceSWStart .

Note

Availability of parameters of trigger sources from timer depends on timers availability on the selected device.

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

uint32_t LL_ADC_REG_IsTriggerSourceSWStart ( const ADC_TypeDef * p_adc )

Get ADC group regular conversion trigger source internal (SW start) or external.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR EXTEN LL_ADC_REG_IsTriggerSourceSWStart

Note

In case of group regular trigger source set to external trigger, to determine which peripheral is selected as external trigger, use function LL_ADC_REG_GetTriggerSource() .

Parameters :

p_adc – Pointer to ADC instance

Return values :

Value – “0” if trigger source external trigger Value “1” if trigger source SW start.

void LL_ADC_REG_SetTriggerEdge ( ADC_TypeDef * p_adc , uint32_t external_trigger_edge )

Set ADC group regular conversion trigger polarity.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR EXTEN LL_ADC_REG_SetTriggerEdge

Note

Applicable only for trigger source set to external trigger.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_REG_GetTriggerEdge ( const ADC_TypeDef * p_adc )

Get ADC group regular conversion trigger polarity.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR EXTEN LL_ADC_REG_GetTriggerEdge

Note

Applicable only for trigger source set to external trigger.

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_SetTriggerFrequencyMode ( ADC_TypeDef * p_adc , uint32_t trigger_frequency_mode )

Set ADC trigger frequency mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 LFTRIG LL_ADC_SetTriggerFrequencyMode

Note

ADC trigger frequency mode must be set to low frequency when a duration is exceeded before ADC conversion start trigger event (between ADC enable and ADC conversion start trigger event or between two ADC conversion start trigger event). Duration value: Refer to device datasheet, parameter “tIdle”.

Note

When ADC trigger frequency mode is set to low frequency, some rearm cycles are inserted before performing ADC conversion start, inducing a delay of 2 ADC clock cycles.

Note

Usage of ADC trigger frequency mode with ADC low power mode:

  • Low power mode auto wait: Only the first ADC conversion start trigger inserts the rearm delay.

  • Low power mode auto power-off: ADC trigger frequency mode is discarded.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_GetTriggerFrequencyMode ( const ADC_TypeDef * p_adc )

Get ADC trigger frequency mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 LFTRIG LL_ADC_GetTriggerFrequencyMode

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_SetSamplingMode ( ADC_TypeDef * p_adc , uint32_t sampling_mode )

Set ADC sampling mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 BULB LL_ADC_SetSamplingMode

CFGR2 SMPTRIG LL_ADC_SetSamplingMode

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_GetSamplingMode ( const ADC_TypeDef * p_adc )

Get the ADC sampling mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 BULB LL_ADC_GetSamplingMode

CFGR2 SMPTRIG LL_ADC_GetSamplingMode

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_REG_StartSamplingPhase ( ADC_TypeDef * p_adc )

Start ADC sampling phase for sampling time trigger mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 SWTRIG LL_ADC_REG_StartSamplingPhase

Note

This function is relevant only when

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be enabled without conversion on going on group regular, without conversion stop command on going on group regular, without ADC disable command on going.

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_REG_StopSamplingPhase ( ADC_TypeDef * p_adc )

Stop ADC sampling phase for sampling time trigger mode and start conversion.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 SWTRIG LL_ADC_REG_StopSamplingPhase

Note

This function is relevant only when

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be enabled without conversion on going on group regular, without conversion stop command on going on group regular, without ADC disable command on going.

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_REG_SetSequencerConfigurable ( ADC_TypeDef * p_adc , uint32_t configurability )

Set ADC group regular sequencer configuration flexibility.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR CHSELRMOD LL_ADC_REG_SetSequencerConfigurable

Note

On this STM32 series, ADC group regular sequencer both modes “fully configurable” or “not fully configurable” are available:

  • sequencer configured to fully configurable: sequencer length and each rank affectation to a channel are configurable. Refer to description of function LL_ADC_REG_SetSequencerLength() .

  • sequencer configured to not fully configurable: sequencer length and each rank affectation to a channel are fixed by channel HW number. Refer to description of function LL_ADC_REG_SetSequencerChannels() .

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Note

On this STM32U5 series, this is applicable on ADC4 only.

Parameters :
uint32_t LL_ADC_REG_GetSequencerConfigurable ( const ADC_TypeDef * p_adc )

Get ADC group regular sequencer configuration flexibility.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR CHSELRMOD LL_ADC_REG_SetSequencerConfigurable

Note

On this STM32 series, ADC group regular sequencer both modes “fully configurable” or “not fully configurable” are available:

  • sequencer configured to fully configurable: sequencer length and each rank affectation to a channel are configurable. Refer to description of function LL_ADC_REG_SetSequencerLength() .

  • sequencer configured to not fully configurable: sequencer length and each rank affectation to a channel are fixed by channel HW number. Refer to description of function LL_ADC_REG_SetSequencerChannels() .

Note

On this STM32U5 series, this is applicable on ADC4 only.

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_REG_SetSequencerLength ( ADC_TypeDef * p_adc , uint32_t sequencer_nb_ranks )

Set ADC group regular sequencer length and scan direction.

Reference Manual to LL API cross reference (Register Field Functions)

SQR1 L LL_ADC_REG_SetSequencerLength

Note

Description of ADC group regular sequencer features:

  • For devices with sequencer fully configurable (function “LL_ADC_REG_SetSequencerRanks()” available): sequencer length and each rank affectation to a channel are configurable. This function performs configuration of:

    • Sequence length: Number of ranks in the scan sequence.

    • Sequence direction: Unless specified in parameters, sequencer scan direction is forward (from rank 1 to rank n). Sequencer ranks are selected using function “LL_ADC_REG_SetSequencerRanks()”.

  • For devices with sequencer not fully configurable (function “LL_ADC_REG_SetSequencerChannels()” available): sequencer length and each rank affectation to a channel are defined by channel number. This function performs configuration of:

    • Sequence length: Number of ranks in the scan sequence is defined by number of channels set in the sequence, rank of each channel is fixed by channel HW number. (channel 0 fixed on rank 0, channel 1 fixed on rank1, …).

    • Sequence direction: Unless specified in parameters, sequencer scan direction is forward (from lowest channel number to highest channel number). Sequencer ranks are selected using function “LL_ADC_REG_SetSequencerChannels()”.

Note

Sequencer disabled is equivalent to sequencer of 1 rank: ADC conversion on only 1 channel.

Note

On this STM32 series, ADC4 specificity: change of sequence length clears channels list configured in the sequence.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_REG_GetSequencerLength ( const ADC_TypeDef * p_adc )

Get ADC group regular sequencer length and scan direction.

Reference Manual to LL API cross reference (Register Field Functions)

SQR1 L LL_ADC_REG_GetSequencerLength

Note

Description of ADC group regular sequencer features:

  • For devices with sequencer fully configurable (function “LL_ADC_REG_SetSequencerRanks()” available): sequencer length and each rank affectation to a channel are configurable. This function retrieves:

    • Sequence length: Number of ranks in the scan sequence.

    • Sequence direction: Unless specified in parameters, sequencer scan direction is forward (from rank 1 to rank n). Sequencer ranks are selected using function “LL_ADC_REG_SetSequencerRanks()”.

  • For devices with sequencer not fully configurable (function “LL_ADC_REG_SetSequencerChannels()” available): sequencer length and each rank affectation to a channel are defined by channel number. This function retrieves:

    • Sequence length: Number of ranks in the scan sequence is defined by number of channels set in the sequence, rank of each channel is fixed by channel HW number. (channel 0 fixed on rank 0, channel 1 fixed on rank1, …).

    • Sequence direction: Unless specified in parameters, sequencer scan direction is forward (from lowest channel number to highest channel number). Sequencer ranks are selected using function “LL_ADC_REG_SetSequencerChannels()”.

Note

Sequencer disabled is equivalent to sequencer of 1 rank: ADC conversion on only 1 channel.

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

(1) On STM32U5, parameter available only on ADC instance: ADC1/ADC2.

void LL_ADC_REG_SetSequencerDiscont ( ADC_TypeDef * p_adc , uint32_t seq_discont )

Set ADC group regular sequencer discontinuous mode: sequence subdivided and scan conversions interrupted every selected number of ranks.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR DISCEN LL_ADC_REG_SetSequencerDiscont

CFGR DISCNUM LL_ADC_REG_SetSequencerDiscont

Note

It is not possible to enable both ADC group regular continuous mode and sequencer discontinuous mode.

Note

It is not possible to enable both ADC auto-injected mode and ADC group regular sequencer discontinuous mode.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_REG_GetSequencerDiscont ( const ADC_TypeDef * p_adc )

Get ADC group regular sequencer discontinuous mode: sequence subdivided and scan conversions interrupted every selected number of ranks.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR DISCEN LL_ADC_REG_GetSequencerDiscont

CFGR DISCNUM LL_ADC_REG_GetSequencerDiscont

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_REG_SetSequencerRanks ( ADC_TypeDef * p_adc , uint32_t rank , uint32_t channel )

Set ADC group regular sequence: channel on the selected scan sequence rank.

Reference Manual to LL API cross reference (Register Field Functions)

SQR1 SQ1 LL_ADC_REG_SetSequencerRanks

SQR1 SQ2 LL_ADC_REG_SetSequencerRanks

SQR1 SQ3 LL_ADC_REG_SetSequencerRanks

SQR1 SQ4 LL_ADC_REG_SetSequencerRanks

SQR2 SQ5 LL_ADC_REG_SetSequencerRanks

SQR2 SQ6 LL_ADC_REG_SetSequencerRanks

SQR2 SQ7 LL_ADC_REG_SetSequencerRanks

SQR2 SQ8 LL_ADC_REG_SetSequencerRanks

SQR2 SQ9 LL_ADC_REG_SetSequencerRanks

SQR3 SQ10 LL_ADC_REG_SetSequencerRanks

SQR3 SQ11 LL_ADC_REG_SetSequencerRanks

SQR3 SQ12 LL_ADC_REG_SetSequencerRanks

SQR3 SQ13 LL_ADC_REG_SetSequencerRanks

SQR3 SQ14 LL_ADC_REG_SetSequencerRanks

SQR4 SQ15 LL_ADC_REG_SetSequencerRanks

SQR4 SQ16 LL_ADC_REG_SetSequencerRanks

Note

This function performs configuration of:

  • Channels ordering into each rank of scan sequence: whatever channel can be placed into whatever rank.

Note

On this STM32 series, ADC group regular sequencer is fully configurable: sequencer length and each rank affectation to a channel are configurable. Refer to description of function LL_ADC_REG_SetSequencerLength() .

Note

Depending on devices and packages, some channels can be not available. Refer to device datasheet for channels availability.

Note

On this STM32 series, to measure internal channels (VrefInt, TempSensor, …), measurement paths to internal channels must be enabled separately. This can be done using function LL_ADC_SetCommonPathInternalCh() .

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_REG_GetSequencerRanks ( const ADC_TypeDef * p_adc , uint32_t rank )

Get ADC group regular sequence: channel on the selected scan sequence rank.

Reference Manual to LL API cross reference (Register Field Functions)

SQR1 SQ1 LL_ADC_REG_GetSequencerRanks

SQR1 SQ2 LL_ADC_REG_GetSequencerRanks

SQR1 SQ3 LL_ADC_REG_GetSequencerRanks

SQR1 SQ4 LL_ADC_REG_GetSequencerRanks

SQR2 SQ5 LL_ADC_REG_GetSequencerRanks

SQR2 SQ6 LL_ADC_REG_GetSequencerRanks

SQR2 SQ7 LL_ADC_REG_GetSequencerRanks

SQR2 SQ8 LL_ADC_REG_GetSequencerRanks

SQR2 SQ9 LL_ADC_REG_GetSequencerRanks

SQR3 SQ10 LL_ADC_REG_GetSequencerRanks

SQR3 SQ11 LL_ADC_REG_GetSequencerRanks

SQR3 SQ12 LL_ADC_REG_GetSequencerRanks

SQR3 SQ13 LL_ADC_REG_GetSequencerRanks

SQR3 SQ14 LL_ADC_REG_GetSequencerRanks

SQR4 SQ15 LL_ADC_REG_GetSequencerRanks

SQR4 SQ16 LL_ADC_REG_GetSequencerRanks

Note

On this STM32 series, ADC group regular sequencer is fully configurable: sequencer length and each rank affectation to a channel are configurable. Refer to description of function LL_ADC_REG_SetSequencerLength() .

Note

Depending on devices and packages, some channels can be not available. Refer to device datasheet for channels availability.

Note

Usage of the returned channel number:

  • To reinject this channel into another function LL_ADC_xxx: the returned channel number is only partly formatted on definition of literals LL_ADC_CHANNEL_x. Therefore, it has to be compared with parts of literals LL_ADC_CHANNEL_x or using helper macro LL_ADC_CHANNEL_TO_DECIMAL_NB() . Then the selected literal LL_ADC_CHANNEL_x can be used as parameter for another function.

  • To get the channel number in decimal format: process the returned value with the helper macro LL_ADC_CHANNEL_TO_DECIMAL_NB() .

Parameters :
Return values :

Returned – value corresponds to one of literals LL_ADC_CHANNEL_x with specific formatting, refer to note of this function.

void LL_ADC_REG_SetSequencerScanDirection ( ADC_TypeDef * p_adc , uint32_t scan_direction )

Set ADC group regular sequencer scan direction.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR1 SCANDIR LL_ADC_REG_SetSequencerScanDirection

Note

On this STM32 series, parameter relevant only is sequencer is set to mode not fully configurable, refer to function LL_ADC_REG_SetSequencerConfigurable() .

Note

On some other STM32 families, this setting is not available and the default scan direction is forward.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_REG_GetSequencerScanDirection ( const ADC_TypeDef * p_adc )

Get ADC group regular sequencer scan direction.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR1 SCANDIR LL_ADC_REG_GetSequencerScanDirection

Note

On this STM32 series, parameter relevant only is sequencer is set to mode not fully configurable, refer to function LL_ADC_REG_SetSequencerConfigurable() .

Note

On some other STM32 families, this setting is not available and the default scan direction is forward.

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_REG_SetSequencerChannels ( ADC_TypeDef * p_adc , uint32_t channel )

Set ADC group regular sequence: channel on rank corresponding to channel number.

Reference Manual to LL API cross reference (Register Field Functions)

CHSELR CHSEL0 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL1 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL2 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL3 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL4 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL5 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL6 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL7 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL8 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL9 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL10 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL11 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL12 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL13 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL14 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL15 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL16 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL17 LL_ADC_REG_SetSequencerChannels

CHSELR CHSEL18 LL_ADC_REG_SetSequencerChannels

Note

This function performs:

  • Channels ordering into each rank of scan sequence: rank of each channel is fixed by channel HW number (channel 0 fixed on rank 0, channel 1 fixed on rank1, …).

  • Set channels selected by overwriting the current sequencer configuration.

Note

On this STM32 series, ADC group regular sequencer both modes “fully configurable” or “not fully configurable” are available, they can be chosen using function LL_ADC_REG_SetSequencerConfigurable() . This function can be used with setting “not fully configurable”. Refer to description of functions LL_ADC_REG_SetSequencerConfigurable() and LL_ADC_REG_SetSequencerLength() .

Note

Depending on devices and packages, some channels can be not available. Refer to device datasheet for channels availability.

Note

On this STM32 series, to measure internal channels (VrefInt, TempSensor, …), measurement paths to internal channels must be enabled separately. This can be done using function LL_ADC_SetCommonPathInternalCh() .

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Note

One or several values can be selected. Example: (LL_ADC_CHANNEL_4 | LL_ADC_CHANNEL_12 | …)

Parameters :
void LL_ADC_REG_SetSequencerChAdd ( ADC_TypeDef * p_adc , uint32_t channel )

Add channel to ADC group regular sequence: channel on rank corresponding to channel number.

Reference Manual to LL API cross reference (Register Field Functions)

CHSELR CHSEL0 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL1 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL2 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL3 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL4 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL5 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL6 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL7 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL8 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL9 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL10 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL11 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL12 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL13 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL14 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL15 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL16 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL17 LL_ADC_REG_SetSequencerChAdd

CHSELR CHSEL18 LL_ADC_REG_SetSequencerChAdd

Note

This function performs:

  • Channels ordering into each rank of scan sequence: rank of each channel is fixed by channel HW number (channel 0 fixed on rank 0, channel 1 fixed on rank1, …).

  • Set channels selected by adding them to the current sequencer configuration.

Note

On this STM32 series, ADC group regular sequencer both modes “fully configurable” or “not fully configurable” are available, they can be chosen using function LL_ADC_REG_SetSequencerConfigurable() . This function can be used with setting “not fully configurable”. Refer to description of functions LL_ADC_REG_SetSequencerConfigurable() and LL_ADC_REG_SetSequencerLength() .

Note

Depending on devices and packages, some channels can be not available. Refer to device datasheet for channels availability.

Note

On this STM32 series, to measure internal channels (VrefInt, TempSensor, …), measurement paths to internal channels must be enabled separately. This can be done using function LL_ADC_SetCommonPathInternalCh() .

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Note

One or several values can be selected. Example: (LL_ADC_CHANNEL_4 | LL_ADC_CHANNEL_12 | …)

Parameters :
void LL_ADC_REG_SetSequencerChRem ( ADC_TypeDef * p_adc , uint32_t channel )

Remove channel to ADC group regular sequence: channel on rank corresponding to channel number.

Reference Manual to LL API cross reference (Register Field Functions)

CHSELR CHSEL0 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL1 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL2 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL3 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL4 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL5 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL6 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL7 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL8 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL9 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL10 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL11 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL12 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL13 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL14 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL15 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL16 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL17 LL_ADC_REG_SetSequencerChRem

CHSELR CHSEL18 LL_ADC_REG_SetSequencerChRem

Note

This function performs:

  • Channels ordering into each rank of scan sequence: rank of each channel is fixed by channel HW number (channel 0 fixed on rank 0, channel 1 fixed on rank1, …).

  • Set channels selected by removing them to the current sequencer configuration.

Note

On this STM32 series, ADC group regular sequencer both modes “fully configurable” or “not fully configurable” are available, they can be chosen using function LL_ADC_REG_SetSequencerConfigurable() . This function can be used with setting “not fully configurable”. Refer to description of functions LL_ADC_REG_SetSequencerConfigurable() and LL_ADC_REG_SetSequencerLength() .

Note

Depending on devices and packages, some channels can be not available. Refer to device datasheet for channels availability.

Note

On this STM32 series, to measure internal channels (VrefInt, TempSensor, …), measurement paths to internal channels must be enabled separately. This can be done using function LL_ADC_SetCommonPathInternalCh() .

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Note

One or several values can be selected. Example: (LL_ADC_CHANNEL_4 | LL_ADC_CHANNEL_12 | …)

Parameters :
uint32_t LL_ADC_REG_GetSequencerChannels ( const ADC_TypeDef * p_adc )

Get ADC group regular sequence: channel on rank corresponding to channel number.

Reference Manual to LL API cross reference (Register Field Functions)

CHSELR CHSEL0 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL1 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL2 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL3 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL4 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL5 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL6 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL7 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL8 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL9 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL10 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL11 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL12 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL13 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL14 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL15 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL16 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL17 LL_ADC_REG_GetSequencerChannels

CHSELR CHSEL18 LL_ADC_REG_GetSequencerChannels

Note

This function performs:

  • Channels order reading into each rank of scan sequence: rank of each channel is fixed by channel HW number (channel 0 fixed on rank 0, channel 1 fixed on rank1, …).

Note

On this STM32 series, ADC group regular sequencer both modes “fully configurable” or “not fully configurable” are available, they can be chosen using function LL_ADC_REG_SetSequencerConfigurable() . This function can be used with setting “not fully configurable”. Refer to description of functions LL_ADC_REG_SetSequencerConfigurable() and LL_ADC_REG_SetSequencerLength() .

Note

Depending on devices and packages, some channels can be not available. Refer to device datasheet for channels availability.

Note

On this STM32 series, to measure internal channels (VrefInt, TempSensor, …), measurement paths to internal channels must be enabled separately. This can be done using function LL_ADC_SetCommonPathInternalCh() .

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Note

One or several values can be retrieved. Example: (LL_ADC_CHANNEL_4 | LL_ADC_CHANNEL_12 | …)

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be a combination of the following values (example: “(LL_ADC_CHANNEL_x | LL_ADC_CHANNEL_y)”):

(1) On STM32U5, parameter can be set in ADC group sequencer only if sequencer is set in mode “not fully configurable”, refer to function LL_ADC_REG_SetSequencerConfigurable() .

void LL_ADC_SetChannelPreselection ( ADC_TypeDef * p_adc , uint32_t channel )

Set ADC Channel Preselection to LL_ADC_CHANNEL_x, x = 0 to 19.

Reference Manual to LL API cross reference (Register Field Functions)

PCSEL PCSEL0 LL_ADC_CHANNEL_0

PCSEL PCSEL1 LL_ADC_CHANNEL_1

PCSEL PCSEL2 LL_ADC_CHANNEL_2

PCSEL PCSEL3 LL_ADC_CHANNEL_3

PCSEL PCSEL4 LL_ADC_CHANNEL_4

PCSEL PCSEL5 LL_ADC_CHANNEL_5

PCSEL PCSEL6 LL_ADC_CHANNEL_6

PCSEL PCSEL7 LL_ADC_CHANNEL_7

PCSEL PCSEL8 LL_ADC_CHANNEL_8

PCSEL PCSEL9 LL_ADC_CHANNEL_9

PCSEL PCSEL10 LL_ADC_CHANNEL_10

PCSEL PCSEL11 LL_ADC_CHANNEL_11

PCSEL PCSEL12 LL_ADC_CHANNEL_12

PCSEL PCSEL13 LL_ADC_CHANNEL_13

PCSEL PCSEL14 LL_ADC_CHANNEL_14

PCSEL PCSEL15 LL_ADC_CHANNEL_15

PCSEL PCSEL16 LL_ADC_CHANNEL_16

PCSEL PCSEL17 LL_ADC_CHANNEL_17

PCSEL PCSEL18 LL_ADC_CHANNEL_18

PCSEL PCSEL19 LL_ADC_CHANNEL_19

Note

This function set the the value for the channel preselection register corresponding to ADC channel to be selected.

Note

Caution: This is not valid for ADC4.

Parameters :
uint32_t LL_ADC_GetChannelPreselection ( const ADC_TypeDef * p_adc )

Get ADC Channel Preselection register value.

Reference Manual to LL API cross reference (Register Field Functions)

PCSEL PCSEL0 LL_ADC_CHANNEL_0

PCSEL PCSEL1 LL_ADC_CHANNEL_1

PCSEL PCSEL2 LL_ADC_CHANNEL_2

PCSEL PCSEL3 LL_ADC_CHANNEL_3

PCSEL PCSEL4 LL_ADC_CHANNEL_4

PCSEL PCSEL5 LL_ADC_CHANNEL_5

PCSEL PCSEL6 LL_ADC_CHANNEL_6

PCSEL PCSEL7 LL_ADC_CHANNEL_7

PCSEL PCSEL8 LL_ADC_CHANNEL_8

PCSEL PCSEL9 LL_ADC_CHANNEL_9

PCSEL PCSEL10 LL_ADC_CHANNEL_10

PCSEL PCSEL11 LL_ADC_CHANNEL_11

PCSEL PCSEL12 LL_ADC_CHANNEL_12

PCSEL PCSEL13 LL_ADC_CHANNEL_13

PCSEL PCSEL14 LL_ADC_CHANNEL_14

PCSEL PCSEL15 LL_ADC_CHANNEL_15

PCSEL PCSEL16 LL_ADC_CHANNEL_16

PCSEL PCSEL17 LL_ADC_CHANNEL_17

PCSEL PCSEL18 LL_ADC_CHANNEL_18

PCSEL PCSEL19 LL_ADC_CHANNEL_19

Note

This function set the the value for the channel preselection register corresponding to ADC channel to be selected.

Note

Caution: This is not valid for ADC4.

Note

Usage of the returned value: Returned decimal value that can correspond to one or multiple channels. If configuration corresponds to only one channel:

  • To reinject this channel into another function LL_ADC_xxx: the returned channel number is only partly formatted on definition of literals LL_ADC_CHANNEL_x. Therefore, it has to be compared with parts of literals LL_ADC_CHANNEL_x or using helper macro LL_ADC_CHANNEL_TO_DECIMAL_NB() . Then the selected literal LL_ADC_CHANNEL_x can be used as parameter for another function.

  • To get the channel number in decimal format: process the returned value with the helper macro LL_ADC_CHANNEL_TO_DECIMAL_NB() . If configuration corresponds to multiple channels: value cannot be associated to channel number.

Parameters :

p_adc – Pointer to ADC instance.

Return values :

Returned – decimal value that can correspond to one or multiple channels (refer to note in function description).

void LL_ADC_SetLPModeAutoPowerOff ( ADC_TypeDef * p_adc , uint32_t low_power_mode )

Set ADC low power mode.

Reference Manual to LL API cross reference (Register Field Functions)

PWRR AUTOFF LL_ADC_SetLPModeAutoPowerOff

Note

Description of ADC low power mode:

  • ADC low power mode “auto power-off”: the ADC automatically powers-off after a conversion and automatically wakes up when a new conversion is triggered (with startup time between trigger and start of sampling). This feature can be combined with low power mode “auto wait”.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled.

Parameters :
uint32_t LL_ADC_GetLPModeAutoPowerOff ( const ADC_TypeDef * p_adc )

Get ADC low power mode.

Reference Manual to LL API cross reference (Register Field Functions)

PW AUTOFF LL_ADC_GetLPModeAutoPowerOff

Note

Description of ADC low power mode:

  • ADC low power mode “auto power-off”: the ADC automatically powers-off after a conversion and automatically wakes up when a new conversion is triggered (with startup time between trigger and start of sampling). This feature can be combined with low power mode “auto wait”.

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_SetLPModeAutonomousDPD ( ADC_TypeDef * p_adc , uint32_t low_power_mode )

Set ADC low power mode: deep power down in autonomous mode.

Reference Manual to LL API cross reference (Register Field Functions)

PWRR DPD LL_ADC_SetLPModeAutonomousDPD

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled.

Parameters :
uint32_t LL_ADC_GetLPModeAutonomousDPD ( const ADC_TypeDef * p_adc )

Get ADC low power mode: deep power down in autonomous mode.

Reference Manual to LL API cross reference (Register Field Functions)

PWRR DPD LL_ADC_GetLPModeAutonomousDPD

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_SetVrefProtection ( ADC_TypeDef * p_adc , uint32_t vref_protection )

Set ADC VREF protection when multiple ADCs are working simultaneously.

Reference Manual to LL API cross reference (Register Field Functions)

PWRR VREFPROT LL_ADC_SetVrefProtection

PWRR VREFSECSMP LL_ADC_SetVrefProtection

Note

In case of simultaneous sampling phase of ADC4 and ADC1/2, ADC4 is put on hold during one or two ADC4 clock cycles to avoid noise on Vref+. ADC state: ADC must be disabled.

Parameters :
uint32_t LL_ADC_GetVrefProtection ( const ADC_TypeDef * p_adc )

ADC VREF protection when multiple ADCs are working simultaneously.

Reference Manual to LL API cross reference (Register Field Functions)

PWRR VREFPROT LL_ADC_GetVrefProtection

PWRR VREFSECSMP LL_ADC_GetVrefProtection

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_REG_SetContinuousMode ( ADC_TypeDef * p_adc , uint32_t continuous )

Set ADC continuous conversion mode on ADC group regular.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR CONT LL_ADC_REG_SetContinuousMode

Note

Description of ADC continuous conversion mode:

  • single mode: one conversion per trigger

  • continuous mode: after the first trigger, following conversions launched successively automatically.

Note

It is not possible to enable both ADC group regular continuous mode and sequencer discontinuous mode.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_REG_GetContinuousMode ( const ADC_TypeDef * p_adc )

Get ADC continuous conversion mode on ADC group regular.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR CONT LL_ADC_REG_GetContinuousMode

Note

Description of ADC continuous conversion mode:

  • single mode: one conversion per trigger

  • continuous mode: after the first trigger, following conversions launched successively automatically.

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_REG_SetDataTransferMode ( ADC_TypeDef * p_adc , uint32_t data_transfer_mode )

Set ADC data transfer mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR DMNGT LL_ADC_REG_SetDataTransferMode

Note

Conversion data can be either:

  • Available in Data Register

  • Transferred by DMA in one shot mode

  • Transferred by DMA in circular mode

  • Transferred to MDF data register

Parameters :
uint32_t LL_ADC_REG_GetDataTransferMode ( const ADC_TypeDef * p_adc )

Get ADC data transfer mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR DMNGT LL_ADC_REG_GetDataTransferMode

Note

Conversion data can be either:

  • Available in Data Register

  • Transferred by DMA in one shot mode

  • Transferred by DMA in circular mode

  • Transferred to DFSDM data register

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_REG_SetDMATransfer ( ADC_TypeDef * p_adc , uint32_t dma_transfer )

Set ADC group regular conversion data transfer: no transfer or transfer by DMA, and DMA requests mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR1 DMAEN LL_ADC_REG_SetDMATransfer

CFGR1 DMACFG LL_ADC_REG_SetDMATransfer

Note

If transfer by DMA selected, 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).

Note

To configure DMA source address (peripheral address), use function LL_ADC_DMA_GetRegAddr() .

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_REG_GetDMATransfer ( const ADC_TypeDef * p_adc )

Get ADC group regular conversion data transfer: no transfer or transfer by DMA, and DMA requests mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR1 DMAEN LL_ADC_REG_GetDMATransfer

CFGR1 DMACFG LL_ADC_REG_GetDMATransfer

Note

If transfer by DMA selected, 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).

Note

To configure DMA source address (peripheral address), use function LL_ADC_DMA_GetRegAddr() .

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_REG_SetOverrun ( ADC_TypeDef * p_adc , uint32_t overrun )

Set ADC group regular behavior in case of overrun: data preserved or overwritten.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR OVRMOD LL_ADC_REG_SetOverrun

Note

Compatibility with devices without feature overrun: other devices without this feature have a behavior equivalent to data overwritten. The default setting of overrun is data preserved. Therefore, for compatibility with all devices, parameter overrun can be set to data overwritten.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
uint32_t LL_ADC_REG_GetOverrun ( const ADC_TypeDef * p_adc )

Get ADC group regular behavior in case of overrun: data preserved or overwritten.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR OVRMOD LL_ADC_REG_GetOverrun

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

Configuration of ADC hierarchical scope: group injected

group ADC_LL_EF_Configuration_ADC_Group_Injected

Functions

void LL_ADC_INJ_SetTriggerSource ( ADC_TypeDef * p_adc , uint32_t trigger_source )

Set ADC group injected conversion trigger source: internal (SW start) or from external peripheral (timer event, external interrupt line).

Reference Manual to LL API cross reference (Register Field Functions)

JSQR JEXTSEL LL_ADC_INJ_SetTriggerSource

JSQR JEXTEN LL_ADC_INJ_SetTriggerSource

Note

On this STM32 series, setting trigger source to external trigger also set trigger polarity to rising edge (default setting for compatibility with some ADC on other STM32 families having this setting set by HW default value). In case of need to modify trigger edge, use function LL_ADC_INJ_SetTriggerEdge() .

Note

Availability of parameters of trigger sources from timer depends on timers availability on the selected device.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must not be disabled. Can be enabled with or without conversion on going on either groups regular or injected.

Parameters :
uint32_t LL_ADC_INJ_GetTriggerSource ( const ADC_TypeDef * p_adc )

Get ADC group injected conversion trigger source: internal (SW start) or from external peripheral (timer event, external interrupt line).

Reference Manual to LL API cross reference (Register Field Functions)

JSQR JEXTSEL LL_ADC_INJ_GetTriggerSource

JSQR JEXTEN LL_ADC_INJ_GetTriggerSource

Note

To determine whether group injected trigger source is internal (SW start) or external, without detail of which peripheral is selected as external trigger, (equivalent to “if(LL_ADC_INJ_GetTriggerSource(ADC1) == LL_ADC_INJ_TRIG_SOFTWARE)”) use function LL_ADC_INJ_IsTriggerSourceSWStart .

Note

Availability of parameters of trigger sources from timer depends on timers availability on the selected device.

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

uint32_t LL_ADC_INJ_IsTriggerSourceSWStart ( const ADC_TypeDef * p_adc )

Get ADC group injected conversion trigger source internal (SW start) or external.

Reference Manual to LL API cross reference (Register Field Functions)

JSQR JEXTEN LL_ADC_INJ_IsTriggerSourceSWStart

Note

In case of group injected trigger source set to external trigger, to determine which peripheral is selected as external trigger, use function LL_ADC_INJ_GetTriggerSource .

Parameters :

p_adc – Pointer to ADC instance

Return values :

Value – “0” if trigger source external trigger Value “1” if trigger source SW start.

void LL_ADC_INJ_SetTriggerEdge ( ADC_TypeDef * p_adc , uint32_t external_trigger_edge )

Set ADC group injected conversion trigger polarity. Applicable only for trigger source set to external trigger.

Reference Manual to LL API cross reference (Register Field Functions)

JSQR JEXTEN LL_ADC_INJ_SetTriggerEdge

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must not be disabled. Can be enabled with or without conversion on going on either groups regular or injected.

Parameters :
uint32_t LL_ADC_INJ_GetTriggerEdge ( const ADC_TypeDef * p_adc )

Get ADC group injected conversion trigger polarity. Applicable only for trigger source set to external trigger.

Reference Manual to LL API cross reference (Register Field Functions)

JSQR JEXTEN LL_ADC_INJ_GetTriggerEdge

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_INJ_SetSequencerLength ( ADC_TypeDef * p_adc , uint32_t sequencer_nb_ranks )

Set ADC group injected sequencer length and scan direction.

Reference Manual to LL API cross reference (Register Field Functions)

JSQR JL LL_ADC_INJ_SetSequencerLength

Note

This function performs configuration of:

  • Sequence length: Number of ranks in the scan sequence.

  • Sequence direction: Unless specified in parameters, sequencer scan direction is forward (from rank 1 to rank n).

Note

Sequencer disabled is equivalent to sequencer of 1 rank: ADC conversion on only 1 channel.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must not be disabled. Can be enabled with or without conversion on going on either groups regular or injected.

Parameters :
uint32_t LL_ADC_INJ_GetSequencerLength ( const ADC_TypeDef * p_adc )

Get ADC group injected sequencer length and scan direction.

Reference Manual to LL API cross reference (Register Field Functions)

JSQR JL LL_ADC_INJ_GetSequencerLength

Note

This function retrieves:

  • Sequence length: Number of ranks in the scan sequence.

  • Sequence direction: Unless specified in parameters, sequencer scan direction is forward (from rank 1 to rank n).

Note

Sequencer disabled is equivalent to sequencer of 1 rank: ADC conversion on only 1 channel.

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_INJ_SetSequencerDiscont ( ADC_TypeDef * p_adc , uint32_t seq_discont )

Set ADC group injected sequencer discontinuous mode: sequence subdivided and scan conversions interrupted every selected number of ranks.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR JDISCEN LL_ADC_INJ_SetSequencerDiscont

Note

It is not possible to enable both ADC group injected auto-injected mode and sequencer discontinuous mode.

Parameters :
uint32_t LL_ADC_INJ_GetSequencerDiscont ( const ADC_TypeDef * p_adc )

Get ADC group injected sequencer discontinuous mode: sequence subdivided and scan conversions interrupted every selected number of ranks.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR JDISCEN LL_ADC_INJ_GetSequencerDiscont

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_INJ_SetSequencerRanks ( ADC_TypeDef * p_adc , uint32_t rank , uint32_t channel )

Set ADC group injected sequence: channel on the selected sequence rank.

Reference Manual to LL API cross reference (Register Field Functions)

JSQR JSQ1 LL_ADC_INJ_SetSequencerRanks

JSQR JSQ2 LL_ADC_INJ_SetSequencerRanks

JSQR JSQ3 LL_ADC_INJ_SetSequencerRanks

JSQR JSQ4 LL_ADC_INJ_SetSequencerRanks

Note

Depending on devices and packages, some channels can be not available. Refer to device datasheet for channels availability.

Note

On this STM32 series, to measure internal channels (VrefInt, TempSensor, …), measurement paths to internal channels must be enabled separately. This can be done using function LL_ADC_SetCommonPathInternalCh() .

Note

On STM32U5, some fast channels are available: fast analog inputs coming from GPIO pads (ADC_IN0..5).

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must not be disabled. Can be enabled with or without conversion on going on either groups regular or injected.

Parameters :
uint32_t LL_ADC_INJ_GetSequencerRanks ( const ADC_TypeDef * p_adc , uint32_t rank )

Get ADC group injected sequence: channel on the selected sequence rank.

Reference Manual to LL API cross reference (Register Field Functions)

JSQR JSQ1 LL_ADC_INJ_GetSequencerRanks

JSQR JSQ2 LL_ADC_INJ_GetSequencerRanks

JSQR JSQ3 LL_ADC_INJ_GetSequencerRanks

JSQR JSQ4 LL_ADC_INJ_GetSequencerRanks

Note

Depending on devices and packages, some channels can be not available. Refer to device datasheet for channels availability.

Note

Usage of the returned channel number:

  • To reinject this channel into another function LL_ADC_xxx: the returned channel number is only partly formatted on definition of literals LL_ADC_CHANNEL_x. Therefore, it has to be compared with parts of literals LL_ADC_CHANNEL_x or using helper macro LL_ADC_CHANNEL_TO_DECIMAL_NB() . Then the selected literal LL_ADC_CHANNEL_x can be used as parameter for another function.

  • To get the channel number in decimal format: process the returned value with the helper macro LL_ADC_CHANNEL_TO_DECIMAL_NB() .

Parameters :
Return values :

Returned – value corresponds to one of literals LL_ADC_CHANNEL_x with specific formatting, refer to note of this function.

void LL_ADC_INJ_SetTrigAuto ( ADC_TypeDef * p_adc , uint32_t trig_auto )

Set ADC group injected conversion trigger: independent or from ADC group regular.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR JAUTO LL_ADC_INJ_SetTrigAuto

Note

This mode can be used to extend number of data registers updated after one ADC conversion trigger and with data permanently kept (not erased by successive conversions of scan of ADC sequencer ranks), up to 5 data registers: 1 data register on ADC group regular, 4 data registers on ADC group injected.

Note

If ADC group injected injected trigger source is set to an external trigger, this feature must be must be set to independent trigger. ADC group injected automatic trigger is compliant only with group injected trigger source set to SW start, without any further action on ADC group injected conversion start or stop: in this case, ADC group injected is controlled only from ADC group regular.

Note

It is not possible to enable both ADC group injected auto-injected mode and sequencer discontinuous mode.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on either groups regular or injected.

Parameters :
uint32_t LL_ADC_INJ_GetTrigAuto ( const ADC_TypeDef * p_adc )

Get ADC group injected conversion trigger: independent or from ADC group regular.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR JAUTO LL_ADC_INJ_GetTrigAuto

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_INJ_ConfigQueueContext ( ADC_TypeDef * p_adc , uint32_t trigger_source , uint32_t external_trigger_edge , uint32_t sequencer_nb_ranks , uint32_t Rank1_Channel , uint32_t Rank2_Channel , uint32_t Rank3_Channel , uint32_t Rank4_Channel )

Set one context on ADC group injected that will be checked in contexts queue.

Reference Manual to LL API cross reference (Register Field Functions)

JSQR JEXTSEL LL_ADC_INJ_ConfigQueueContext

JSQR JEXTEN LL_ADC_INJ_ConfigQueueContext

JSQR JL LL_ADC_INJ_ConfigQueueContext

JSQR JSQ1 LL_ADC_INJ_ConfigQueueContext

JSQR JSQ2 LL_ADC_INJ_ConfigQueueContext

JSQR JSQ3 LL_ADC_INJ_ConfigQueueContext

JSQR JSQ4 LL_ADC_INJ_ConfigQueueContext

Note

Specific STM32U5: Function kept for compatibility with other STM32 series, but has no dedicated use case on STM32U5: does not features contexts queue. Function can be replaced by equivalent LL functions:

Note

In the contexts queue, only the active context can be read. The parameters of this function can be read using functions:

Note

On this STM32 series, to measure internal channels (VrefInt, TempSensor, …), measurement paths to internal channels must be enabled separately. This can be done using function LL_ADC_SetCommonPathInternalCh() .

Note

On STM32U5, some fast channels are available: fast analog inputs coming from GPIO pads (ADC_IN0..5).

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must not be disabled. Can be enabled with or without conversion on going on either groups regular or injected.

Parameters :

Configuration of ADC hierarchical scope: channels

group ADC_LL_EF_Configuration_Channels

Functions

void LL_ADC_SetChannelSamplingTime ( ADC_TypeDef * p_adc , uint32_t channel , uint32_t sampling_time )

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

Reference Manual to LL API cross reference (Register Field Functions)

SMPR1 SMP0 LL_ADC_SetChannelSamplingTime

SMPR1 SMP1 LL_ADC_SetChannelSamplingTime

SMPR1 SMP2 LL_ADC_SetChannelSamplingTime

SMPR1 SMP3 LL_ADC_SetChannelSamplingTime

SMPR1 SMP4 LL_ADC_SetChannelSamplingTime

SMPR1 SMP5 LL_ADC_SetChannelSamplingTime

SMPR1 SMP6 LL_ADC_SetChannelSamplingTime

SMPR1 SMP7 LL_ADC_SetChannelSamplingTime

SMPR1 SMP8 LL_ADC_SetChannelSamplingTime

SMPR1 SMP9 LL_ADC_SetChannelSamplingTime

SMPR2 SMP10 LL_ADC_SetChannelSamplingTime

SMPR2 SMP11 LL_ADC_SetChannelSamplingTime

SMPR2 SMP12 LL_ADC_SetChannelSamplingTime

SMPR2 SMP13 LL_ADC_SetChannelSamplingTime

SMPR2 SMP14 LL_ADC_SetChannelSamplingTime

SMPR2 SMP15 LL_ADC_SetChannelSamplingTime

SMPR2 SMP16 LL_ADC_SetChannelSamplingTime

SMPR2 SMP17 LL_ADC_SetChannelSamplingTime

SMPR2 SMP18 LL_ADC_SetChannelSamplingTime

Note

On this device, sampling time is on channel scope: independently of channel mapped on ADC group regular or injected.

Note

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, …).

Note

Conversion time is the addition of sampling time and processing time. On this STM32 series, ADC processing time is:

  • 12.5 ADC clock cycles at ADC resolution 12 bits

  • 10.5 ADC clock cycles at ADC resolution 10 bits

  • 8.5 ADC clock cycles at ADC resolution 8 bits

  • 6.5 ADC clock cycles at ADC resolution 6 bits

Note

In case of ADC conversion of internal channel (VrefInt, temperature sensor, …), a sampling time minimum value is required. Refer to device datasheet.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on either groups regular or injected.

Parameters :
uint32_t LL_ADC_GetChannelSamplingTime ( const ADC_TypeDef * p_adc , uint32_t channel )

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

Reference Manual to LL API cross reference (Register Field Functions)

SMPR1 SMP0 LL_ADC_GetChannelSamplingTime

SMPR1 SMP1 LL_ADC_GetChannelSamplingTime

SMPR1 SMP2 LL_ADC_GetChannelSamplingTime

SMPR1 SMP3 LL_ADC_GetChannelSamplingTime

SMPR1 SMP4 LL_ADC_GetChannelSamplingTime

SMPR1 SMP5 LL_ADC_GetChannelSamplingTime

SMPR1 SMP6 LL_ADC_GetChannelSamplingTime

SMPR1 SMP7 LL_ADC_GetChannelSamplingTime

SMPR1 SMP8 LL_ADC_GetChannelSamplingTime

SMPR1 SMP9 LL_ADC_GetChannelSamplingTime

SMPR2 SMP10 LL_ADC_GetChannelSamplingTime

SMPR2 SMP11 LL_ADC_GetChannelSamplingTime

SMPR2 SMP12 LL_ADC_GetChannelSamplingTime

SMPR2 SMP13 LL_ADC_GetChannelSamplingTime

SMPR2 SMP14 LL_ADC_GetChannelSamplingTime

SMPR2 SMP15 LL_ADC_GetChannelSamplingTime

SMPR2 SMP16 LL_ADC_GetChannelSamplingTime

SMPR2 SMP17 LL_ADC_GetChannelSamplingTime

SMPR2 SMP18 LL_ADC_GetChannelSamplingTime

Note

On this device, sampling time is on channel scope: independently of channel mapped on ADC group regular or injected.

Note

Conversion time is the addition of sampling time and processing time. On this STM32 series, ADC processing time is:

  • 12.5 ADC clock cycles at ADC resolution 12 bits

  • 10.5 ADC clock cycles at ADC resolution 10 bits

  • 8.5 ADC clock cycles at ADC resolution 8 bits

  • 6.5 ADC clock cycles at ADC resolution 6 bits

Parameters :
Return values :

In – case of ADC1 instance, Returned value can be one of the following values:

(1) On STM32U5, parameter available only on ADC instance: ADC1, ADC2. (2) On STM32U5, parameter available only on ADC instance: ADC4.

void LL_ADC_SetChannelSingleDiff ( ADC_TypeDef * p_adc , uint32_t channel , uint32_t input_mode )

Set mode single-ended or differential input of the selected ADC channel.

Reference Manual to LL API cross reference (Register Field Functions)

DIFSEL DIFSEL LL_ADC_SetChannelSingleDiff

Note

In differential mode: to compute voltage (unit: mV) corresponding to a ADC conversion data (unit: digital value) use helper macro LL_ADC_CALC_DIFF_DATA_TO_VOLTAGE .

Note

In differential mode: Differential measurement is carried out between the selected channel (positive input) and another channel (negative input). Only selected channel has to be configured, the other channel is configured automatically and is not usable separately.

Note

Differential mode is not available on all channels. For compliant channels list, refer to reference manual.

Note

For ADC channels configured in differential mode, both inputs must be biased at (Vref+)/2 +/-200mV. (Vref+ is the analog voltage reference)

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be ADC disabled.

Parameters :
uint32_t LL_ADC_GetChannelSingleDiff ( const ADC_TypeDef * p_adc , uint32_t channel )

Get mode single-ended or differential input of the selected ADC channel.

Reference Manual to LL API cross reference (Register Field Functions)

DIFSEL DIFSEL LL_ADC_GetChannelSingleDiff

Note

In differential mode: Differential measurement is carried out between the selected channel (positive input) and another channel (negative input). Only selected channel has to be configured, the other channel is configured automatically and is not usable separately.

Note

Differential mode is not available on all channels. For compliant channels list, refer to reference manual.

Parameters :
Return values :

Returned – value can be one of the following values:

Configuration of ADC transversal scope: analog watchdog

group ADC_LL_EF_Configuration_ADC_AnalogWatchdog

Functions

void LL_ADC_SetAnalogWDScope ( ADC_TypeDef * p_adc , uint32_t awd_y , uint32_t group , uint32_t channel )

Set ADC analog watchdog monitored channels: ADC group (regular and-or injected) and channel (single, multiple or all channels)

Reference Manual to LL API cross reference (Register Field Functions)

CFGR AWD1CH LL_ADC_SetAnalogWDScope

CFGR AWD1SGL LL_ADC_SetAnalogWDScope

CFGR AWD1EN LL_ADC_SetAnalogWDScope

CFGR JAWD1EN LL_ADC_SetAnalogWDScope

AWD2CR AWD2CH LL_ADC_SetAnalogWDScope

AWD3CR AWD3CH LL_ADC_SetAnalogWDScope

Note

Specific configurations:

  • to monitor all channels, use following parameters values: LL_ADC_SetAnalogWDScope(…, …, group regular and-or injected, LL_ADC_CHANNEL_ALL)

  • to disable ADC analog watchdog, use following parameters values: LL_ADC_SetAnalogWDScope(…, …, LL_ADC_GROUP_NONE, LL_ADC_CHANNEL_NONE) (parameters LL_ADC_GROUP_NONE and LL_ADC_CHANNEL_NONE must be used together, not separately)

  • specific case (only on analog watchdog instances: AWD2, AWD3), to monitor multiple channels use following parameters values (channels list with logical or): LL_ADC_SetAnalogWDScope(…, …, group regular and-or injected, LL_ADC_CHANNEL_x | LL_ADC_CHANNEL_y)

Note

The ADC analog watchdog configuration parameters can be read back using functions LL_ADC_GetAnalogWDScopeGroup and LL_ADC_GetAnalogWDScopeChannel .

Note

Once monitored channels are selected, analog watchdog is enabled.

Note

On this STM32 series, there are 2 kinds of analog watchdog instance:

  • AWD standard (instance AWD1):

    • channels monitored: can monitor 1 channel or all channels.

    • groups monitored: ADC groups regular and-or injected.

  • AWD flexible (instances AWD2, AWD3):

    • channels monitored: flexible on channels monitored, selection is channel wise, from from 1 to all channels. Specificity of this analog watchdog: Multiple channels can be selected. For example: (LL_ADC_AWD_CHANNEL4_REG_INJ | LL_ADC_AWD_CHANNEL5_REG_INJ | …)

    • groups monitored: not selection possible (monitoring on both groups regular and injected). Channels selected are monitored on groups regular and injected: LL_ADC_AWD_CHANNELxx_REG_INJ (do not use parameters LL_ADC_AWD_CHANNELxx_REG and LL_ADC_AWD_CHANNELxx_INJ)

Note

This function replaces deprecated function LL_ADC_SetAnalogWDMonitChannels().

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on either groups regular or injected.

Parameters :
uint32_t LL_ADC_GetAnalogWDScopeGroup ( const ADC_TypeDef * p_adc , uint32_t awd_y )

Get ADC analog watchdog monitored channels: ADC group (regular and-or injected)

Reference Manual to LL API cross reference (Register Field Functions)

CFGR AWD1CH LL_ADC_GetAnalogWDScopeGroup

CFGR AWD1SGL LL_ADC_GetAnalogWDScopeGroup

CFGR AWD1EN LL_ADC_GetAnalogWDScopeGroup

CFGR JAWD1EN LL_ADC_GetAnalogWDScopeGroup

AWD2CR AWD2CH LL_ADC_GetAnalogWDScopeGroup

AWD3CR AWD3CH LL_ADC_GetAnalogWDScopeGroup

Note

Configuration done by LL_ADC_SetAnalogWDScope() , refer to description of this function for more details on parameters.

Note

This function replaces deprecated function LL_ADC_GetAnalogWDMonitChannels().

Parameters :
Return values :

Returned – value can be one of the following values:

(4) On STM32U5, availability depends on ADC instance and ADC analog watchdog instance.
  • ADC1, ADC2: group regular or injected selection available only on ADC analog watchdog instance: AWD1

  • ADC4: only group regular available

uint32_t LL_ADC_GetAnalogWDScopeChannel ( const ADC_TypeDef * p_adc , uint32_t awd_y )

Get ADC analog watchdog monitored channels: ADC channel (single, multiple or all channels)

Reference Manual to LL API cross reference (Register Field Functions)

CFGR AWD1CH LL_ADC_GetAnalogWDScopeChannel

CFGR AWD1SGL LL_ADC_GetAnalogWDScopeChannel

CFGR AWD1EN LL_ADC_GetAnalogWDScopeChannel

CFGR JAWD1EN LL_ADC_GetAnalogWDScopeChannel

AWD2CR AWD2CH LL_ADC_GetAnalogWDScopeChannel

AWD3CR AWD3CH LL_ADC_GetAnalogWDScopeChannel

Note

Configuration done by LL_ADC_SetAnalogWDScope() , refer to description of this function for more details on parameters.

Note

This function does not support specific case of multiple channels monitored (only on analog watchdog instances: AWD2, AWD3), return not relevant.

Note

Usage of the returned value: Returned decimal value that can correspond to one or multiple channels. If analog watchdog set to monitor only one channel:

  • To reinject this channel into another function LL_ADC_xxx: the returned channel number is only partly formatted on definition of literals LL_ADC_CHANNEL_x. Therefore, it has to be compared with parts of literals LL_ADC_CHANNEL_x or using helper macro LL_ADC_CHANNEL_TO_DECIMAL_NB() . Then the selected literal LL_ADC_CHANNEL_x can be used as parameter for another function.

  • To get the channel number in decimal format: process the returned value with the helper macro LL_ADC_CHANNEL_TO_DECIMAL_NB() . If analog watchdog set to monitor multiple channels: value cannot be associated to channel number.

Note

This function replaces deprecated function LL_ADC_GetAnalogWDMonitChannels().

Parameters :
Return values :

Returned – value corresponds to one of literals LL_ADC_CHANNEL_x with specific formatting, refer to note of this function.

void LL_ADC_SetAnalogWDThresholds ( ADC_TypeDef * p_adc , uint32_t awd_y , uint32_t awd_thresholds_high_low , int32_t awd_threshold_value )

Set ADC analog watchdog threshold value of threshold high or low.

Reference Manual to LL API cross reference (Register Field Functions)

TR1 HT1 LL_ADC_SetAnalogWDThresholds

TR2 HT2 LL_ADC_SetAnalogWDThresholds

TR3 HT3 LL_ADC_SetAnalogWDThresholds

TR1 LT1 LL_ADC_SetAnalogWDThresholds

TR2 LT2 LL_ADC_SetAnalogWDThresholds

TR3 LT3 LL_ADC_SetAnalogWDThresholds

Note

In case of ADC resolution different of default resolution (14 bit in case of ADC1 or ADC2, 12 bit in case of ADC4) analog watchdog thresholds data requires a specific shift. Use helper macro LL_ADC_ANALOGWD_SET_THRESHOLD_RES() .

Note

Specific ADC4: In case of oversampling enabled, analog watchdog monitored range is shifted left (from [11:0] to [15:4]). Therefore, thresholds value must be computed accordingly (shift left 4 bits).

Note

On this STM32 series, there are 2 kinds of analog watchdog instance:

  • AWD standard (instance AWD1):

    • channels monitored: can monitor 1 channel or all channels.

    • groups monitored: ADC groups regular and-or injected.

  • AWD flexible (instances AWD2, AWD3):

    • channels monitored: flexible on channels monitored, selection is channel wise, from from 1 to all channels. Specificity of this analog watchdog: Multiple channels can be selected. For example: (LL_ADC_AWD_CHANNEL4_REG_INJ | LL_ADC_AWD_CHANNEL5_REG_INJ | …)

    • groups monitored: not selection possible (monitoring on both groups regular and injected). Channels selected are monitored on groups regular and injected: LL_ADC_AWD_CHANNELxx_REG_INJ (do not use parameters LL_ADC_AWD_CHANNELxx_REG and LL_ADC_AWD_CHANNELxx_INJ)

Note

If ADC oversampling is enabled, ADC analog watchdog thresholds are impacted: the comparison of analog watchdog thresholds is done on oversampling intermediate computation (after ratio, before shift application): intermediate register bitfield [32:7] (26 most significant bits).

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on either ADC groups regular or injected.

Parameters :
  • p_adc – Pointer to ADC instance

  • awd_y – AWD instance. This parameter can be one of the following values:

  • awd_thresholds_high_low – This parameter can be one of the following values:

  • awd_threshold_value – Analog watchdog threshold value. Value is signed and can exceed ADC resolution with post-processing computation (offset, oversampling, data shift, …). ADC1, 2: between Min_Data=-16777216 (two’s complement 0xFF000000) and Max_Data=+16777215 (0x00FFFFFF) ADC4: between Min_Data=0x000 and Max_Data=0xFFF

int32_t LL_ADC_GetAnalogWDThresholds ( const ADC_TypeDef * p_adc , uint32_t awd_y , uint32_t awd_thresholds_high_low )

Get ADC analog watchdog threshold value of threshold high, threshold low or raw data with ADC thresholds high and low concatenated.

Reference Manual to LL API cross reference (Register Field Functions)

TR1 HT1 LL_ADC_GetAnalogWDThresholds

TR2 HT2 LL_ADC_GetAnalogWDThresholds

TR3 HT3 LL_ADC_GetAnalogWDThresholds

TR1 LT1 LL_ADC_GetAnalogWDThresholds

TR2 LT2 LL_ADC_GetAnalogWDThresholds

TR3 LT3 LL_ADC_GetAnalogWDThresholds

Note

In case of ADC resolution different of default resolution (14 bit in case of ADC1 or ADC2, 12 bit in case of ADC4) analog watchdog thresholds data requires a specific shift. Use helper macro LL_ADC_ANALOGWD_GET_THRESHOLD_RES() .

Parameters :
Return values :

Value – is signed and can exceed ADC resolution with post-processing computation (offset, oversampling, data shift, …). ADC1, 2: between Min_Data=-16777216 (two’s complement 0xFF000000) and Max_Data=+16777215 (0x00FFFFFF) ADC4: between Min_Data=0x000 and Max_Data=0xFFF

void LL_ADC_ConfigAnalogWDThresholds ( ADC_TypeDef * p_adc , uint32_t awd_y , uint32_t awd_threshold_high_value , uint32_t awd_threshold_low_value )

Set ADC analog watchdog thresholds value of both thresholds high and low.

Reference Manual to LL API cross reference (Register Field Functions)

TR1 HT1 LL_ADC_ConfigAnalogWDThresholds

TR2 HT2 LL_ADC_ConfigAnalogWDThresholds

TR3 HT3 LL_ADC_ConfigAnalogWDThresholds

TR1 LT1 LL_ADC_ConfigAnalogWDThresholds

TR2 LT2 LL_ADC_ConfigAnalogWDThresholds

TR3 LT3 LL_ADC_ConfigAnalogWDThresholds

Note

If value of only one threshold high or low must be set, use function LL_ADC_SetAnalogWDThresholds() .

Note

In case of ADC resolution different of default resolution (14 bit in case of ADC1 or ADC2, 12 bit in case of ADC4) analog watchdog thresholds data requires a specific shift.

Note

Specific ADC4: In case of oversampling enabled, analog watchdog monitored range is shifted left (from [11:0] to [15:4]). Therefore, thresholds value must be computed accordingly (shift left 4 bits).

Note

On this STM32 series, there are 2 kinds of analog watchdog instance:

  • AWD standard (instance AWD1):

    • channels monitored: can monitor 1 channel or all channels.

    • groups monitored: ADC group regular.

    • resolution: resolution is not limited (corresponds to ADC resolution configured).

  • AWD flexible (instances AWD2, AWD3):

    • channels monitored: flexible on channels monitored, selection is channel wise, from from 1 to all channels. Specificity of this analog watchdog: Multiple channels can be selected. For example: (LL_ADC_AWD_CHANNEL4_REG_INJ | LL_ADC_AWD_CHANNEL5_REG_INJ | …)

    • groups monitored: not selection possible (monitoring on both groups regular and injected). Channels selected are monitored on groups regular and injected: LL_ADC_AWD_CHANNELxx_REG_INJ (do not use parameters LL_ADC_AWD_CHANNELxx_REG and LL_ADC_AWD_CHANNELxx_INJ)

    • resolution: resolution is not limited (corresponds to ADC resolution configured).

Note

If ADC oversampling is enabled, ADC analog watchdog thresholds are impacted: the comparison of analog watchdog thresholds is done on oversampling final computation (after ratio and shift application): ADC data register bitfield [15:4] (12 most significant bits). Examples:

  • Oversampling ratio and shift selected to have ADC conversion data on 12 bits (ratio 16 and shift 4, or ratio 32 and shift 5, …): ADC analog watchdog thresholds must be divided by 16.

  • Oversampling ratio and shift selected to have ADC conversion data on 14 bits (ratio 16 and shift 2, or ratio 32 and shift 3, …): ADC analog watchdog thresholds must be divided by 4.

  • Oversampling ratio and shift selected to have ADC conversion data on 16 bits (ratio 16 and shift none, or ratio 32 and shift 1, …): ADC analog watchdog thresholds match directly to ADC data register.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Parameters :
  • p_adc – Pointer to ADC instance

  • awd_y – AWD instance. This parameter can be one of the following values:

  • awd_threshold_high_value – Value between Min_Data=0x000 and Max_Data=0xFFF

  • awd_threshold_low_value – Value between Min_Data=0x000 and Max_Data=0xFFF

void LL_ADC_SetAnalogWDFiltering ( ADC_TypeDef * p_adc , uint32_t awd_y , uint32_t awd_filtering )

Set ADC analog watchdog filtering configuration.

Reference Manual to LL API cross reference (Register Field Functions)

TR1 AWDFILT LL_ADC_SetAnalogWDFiltering

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on either groups regular or injected.

Note

On this STM32 series, this feature is only available on first analog watchdog (AWD1)

Parameters :
uint32_t LL_ADC_GetAnalogWDFiltering ( const ADC_TypeDef * p_adc , uint32_t awd_y )

Get ADC analog watchdog filtering configuration.

Reference Manual to LL API cross reference (Register Field Functions)

TR1 AWDFILT LL_ADC_GetAnalogWDFiltering

Note

On this STM32 series, this feature is only available on first analog watchdog (AWD1)

Parameters :
  • p_adc – Pointer to ADC instance

  • awd_y – AWD instance. This parameter can be one of the following values:

Return values :

Returned – value can be:

Configuration of ADC transversal scope: oversampling

group ADC_LL_EF_Configuration_ADC_oversampling

Functions

void LL_ADC_SetOverSamplingScope ( ADC_TypeDef * p_adc , uint32_t ovs_scope )

Set ADC oversampling scope: ADC groups regular and-or injected (availability of ADC group injected depends on STM32 series).

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 ROVSE LL_ADC_SetOverSamplingScope

CFGR2 JOVSE LL_ADC_SetOverSamplingScope

CFGR2 ROVSM LL_ADC_SetOverSamplingScope

Note

If both groups regular and injected are selected, specify behavior of ADC group injected interrupting group regular: when ADC group injected is triggered, the oversampling on ADC group regular is either temporary stopped and continued, or resumed from start (oversampler buffer reset).

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on either groups regular or injected.

Parameters :
uint32_t LL_ADC_GetOverSamplingScope ( const ADC_TypeDef * p_adc )

Get ADC oversampling scope: ADC groups regular and-or injected (availability of ADC group injected depends on STM32 families).

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 ROVSE LL_ADC_GetOverSamplingScope

CFGR2 JOVSE LL_ADC_GetOverSamplingScope

CFGR2 ROVSM LL_ADC_GetOverSamplingScope

Note

If both groups regular and injected are selected, specify behavior of ADC group injected interrupting group regular: when ADC group injected is triggered, the oversampling on ADC group regular is either temporary stopped and continued, or resumed from start (oversampler buffer reset).

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_SetOverSamplingInstScope ( ADC_TypeDef * p_adc , uint32_t ovs_y , uint32_t ovs_scope )

Set ADC oversampling scope: ADC groups regular and-or injected in function of oversampling instance (availability of ADC group injected depends on STM32 series).

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 ROVSE LL_ADC_SetOverSamplingInstScope

CFGR2 ROVSM LL_ADC_SetOverSamplingInstScope

CFGR2 ROVSM LL_ADC_SetOverSamplingInstScope

CFGR2 JOVSE LL_ADC_SetOverSamplingInstScope

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on either groups regular or injected.

Parameters :
uint32_t LL_ADC_GetOverSamplingInstScope ( const ADC_TypeDef * p_adc , uint32_t ovs_y )

Get ADC oversampling scope: ADC groups regular and-or injected in function of oversampling instance (availability of ADC group injected depends on STM32 series).

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 ROVSE LL_ADC_GetOverSamplingInstScope

CFGR2 ROVSM LL_ADC_GetOverSamplingInstScope

CFGR2 ROVSM LL_ADC_GetOverSamplingInstScope

CFGR2 JOVSE LL_ADC_GetOverSamplingInstScope

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_SetOverSamplingDiscont ( ADC_TypeDef * p_adc , uint32_t ovs_discont )

Set ADC oversampling discontinuous mode (triggered mode).

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 TROVS LL_ADC_SetOverSamplingDiscont

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on group regular.

Note

On this STM32 series, oversampling discontinuous mode (triggered mode) can be used only when oversampling is set on group regular only and in resumed mode.

Parameters :
uint32_t LL_ADC_GetOverSamplingDiscont ( const ADC_TypeDef * p_adc )

Get ADC oversampling discontinuous mode (triggered mode) on the selected ADC group.

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 TROVS LL_ADC_GetOverSamplingDiscont

Note

Number of oversampled conversions are done either in:

  • continuous mode (all conversions of oversampling ratio are done from 1 trigger)

  • discontinuous mode (each conversion of oversampling ratio needs a trigger)

Parameters :

p_adc – Pointer to ADC instance

Return values :

Returned – value can be one of the following values:

void LL_ADC_ConfigOverSamplingRatioShift ( ADC_TypeDef * p_adc , uint32_t ratio , uint32_t shift )

Set ADC oversampling (impacting both ADC groups regular and injected)

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 OVSS LL_ADC_ConfigOverSamplingRatioShift

CFGR2 OVSR LL_ADC_ConfigOverSamplingRatioShift

Note

This function set the 2 items of oversampling configuration:

  • ratio

  • shift

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be disabled or enabled without conversion on going on either groups regular or injected.

Parameters :
uint32_t LL_ADC_GetOverSamplingRatio ( const ADC_TypeDef * p_adc )

Get ADC oversampling ratio (impacting both ADC groups regular and injected)

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 OVSR LL_ADC_GetOverSamplingRatio

Parameters :

p_adc – Pointer to ADC instance

Return values :

ovs_ratio – This parameter can be a value from 1 to 1024 in the case of ADC1/2, In the case of ADC4 can be one of the following values:

uint32_t LL_ADC_GetOverSamplingShift ( const ADC_TypeDef * p_adc )

Get ADC oversampling shift (impacting both ADC groups regular and injected)

Reference Manual to LL API cross reference (Register Field Functions)

CFGR2 OVSS LL_ADC_GetOverSamplingShift

Parameters :

p_adc – Pointer to ADC instance

Return values :

shift – This parameter can be one of the following values:

(1) Specific to ADC instance: ADC1, ADC2

Configuration of ADC transversal scope: multimode

group ADC_LL_EF_Configuration_ADC_multimode

Functions

void LL_ADC_SetMultimode ( ADC_Common_TypeDef * p_adc_common , uint32_t Multimode )

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

Reference Manual to LL API cross reference (Register Field Functions)

CCR DUAL LL_ADC_SetMultimode

Note

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

Note

On this STM32 series, 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.

Parameters :
uint32_t LL_ADC_GetMultimode ( const ADC_Common_TypeDef * p_adc_common )

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

Reference Manual to LL API cross reference (Register Field Functions)

CCR DUAL LL_ADC_GetMultimode

Note

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

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

Returned – value can be one of the following values:

void LL_ADC_SetMultiDMATransfer ( ADC_Common_TypeDef * p_adc_common , uint32_t MultiDMATransfer )

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

Reference Manual to LL API cross reference (Register Field Functions)

CCR DAMDF LL_ADC_GetMultiDMATransfer

Note

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).

Note

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() .

Note

On this STM32 series, 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.

Parameters :
uint32_t LL_ADC_GetMultiDMATransfer ( const ADC_Common_TypeDef * p_adc_common )

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

Reference Manual to LL API cross reference (Register Field Functions)

CCR DAMDF LL_ADC_GetMultiDMATransfer

Note

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).

Note

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() .

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

Returned – value can be one of the following values:

void LL_ADC_SetMultiTwoSamplingDelay ( ADC_Common_TypeDef * p_adc_common , uint32_t MultiTwoSamplingDelay )

Set ADC multimode delay between 2 sampling phases.

Reference Manual to LL API cross reference (Register Field Functions)

CCR DELAY LL_ADC_SetMultiTwoSamplingDelay

Note

The sampling delay range depends on ADC resolution:

  • ADC resolution 14 bits can have maximum delay of 16 cycles.

  • ADC resolution 12 bits can have maximum delay of 16 cycles.

  • ADC resolution 10 bits can have maximum delay of 15 cycles.

  • ADC resolution 8 bits can have maximum delay of 13 cycles.

Note

On this STM32 series, 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.

Parameters :
uint32_t LL_ADC_GetMultiTwoSamplingDelay ( const ADC_Common_TypeDef * p_adc_common )

Get ADC multimode delay between 2 sampling phases.

Reference Manual to LL API cross reference (Register Field Functions)

CCR DELAY LL_ADC_GetMultiTwoSamplingDelay

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

Returned – value can be one of the following values:

(1) Parameter available only if ADC resolution is 14, 12 or 10 bits. (2) Parameter available only if ADC resolution is 14 or 12 bits.

Operation on ADC hierarchical scope: ADC instance

group ADC_LL_EF_Operation_ADC_Instance

Functions

void LL_ADC_EnableDeepPowerDown ( ADC_TypeDef * p_adc )

Put ADC instance in deep power down state.

Reference Manual to LL API cross reference (Register Field Functions)

CR DEEPPWD LL_ADC_EnableDeepPowerDown

Note

In case of ADC calibration necessary: When ADC is in deep-power-down state, the internal analog calibration is lost. After exiting from deep power down, calibration must be relaunched or calibration factor (preliminarily saved) must be set back into calibration register.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be ADC disabled.

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_DisableDeepPowerDown ( ADC_TypeDef * p_adc )

Disable ADC deep power down mode.

Reference Manual to LL API cross reference (Register Field Functions)

CR DEEPPWD LL_ADC_DisableDeepPowerDown

Note

In case of ADC calibration necessary: When ADC is in deep-power-down state, the internal analog calibration is lost. After exiting from deep power down, calibration must be relaunched or calibration factor (preliminarily saved) must be set back into calibration register.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be ADC disabled.

Parameters :

p_adc – Pointer to ADC instance

uint32_t LL_ADC_IsDeepPowerDownEnabled ( const ADC_TypeDef * p_adc )

Get the selected ADC instance deep power down state.

Reference Manual to LL API cross reference (Register Field Functions)

CR DEEPPWD LL_ADC_IsDeepPowerDownEnabled

Parameters :

p_adc – Pointer to ADC instance

Return values :

0 – deep power down is disabled, 1: deep power down is enabled.

void LL_ADC_EnableInternalRegulator ( ADC_TypeDef * p_adc )

Enable ADC instance internal voltage regulator.

Reference Manual to LL API cross reference (Register Field Functions)

CR ADVREGEN LL_ADC_EnableInternalRegulator

Note

On this STM32 series, after ADC internal voltage regulator enable, a delay for ADC internal voltage regulator stabilization is required before performing a ADC calibration or ADC enable. Refer to device datasheet, parameter tADCVREG_STUP. Refer to literal LL_ADC_DELAY_INTERNAL_REGUL_STAB_US .

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be ADC disabled.

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_DisableInternalRegulator ( ADC_TypeDef * p_adc )

Disable ADC internal voltage regulator.

Reference Manual to LL API cross reference (Register Field Functions)

CR ADVREGEN LL_ADC_DisableInternalRegulator

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be ADC disabled.

Parameters :

p_adc – Pointer to ADC instance

uint32_t LL_ADC_IsInternalRegulatorEnabled ( const ADC_TypeDef * p_adc )

Get the selected ADC instance internal voltage regulator state.

Reference Manual to LL API cross reference (Register Field Functions)

CR ADVREGEN LL_ADC_IsInternalRegulatorEnabled

Parameters :

p_adc – Pointer to ADC instance

Return values :

0 – internal regulator is disabled, 1: internal regulator is enabled.

void LL_ADC_Enable ( ADC_TypeDef * p_adc )

Enable the selected ADC instance.

Reference Manual to LL API cross reference (Register Field Functions)

CR ADEN LL_ADC_Enable

Note

On this STM32 series, after ADC enable, a delay for ADC internal analog stabilization is required before performing a ADC conversion start. Refer to device datasheet, parameter tSTAB.

Note

On this STM32 series, flag LL_ADC_FLAG_ADRDY is raised when the ADC is enabled and when conversion clock is active. (not only core clock: this ADC has a dual clock domain)

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be ADC disabled and ADC internal voltage regulator enabled.

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_Disable ( ADC_TypeDef * p_adc )

Disable the selected ADC instance.

Reference Manual to LL API cross reference (Register Field Functions)

CR ADDIS LL_ADC_Disable

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be not disabled. Must be enabled without conversion on going on either groups regular or injected.

Parameters :

p_adc – Pointer to ADC instance

uint32_t LL_ADC_IsEnabled ( const ADC_TypeDef * p_adc )

Get the selected ADC instance enable state.

Reference Manual to LL API cross reference (Register Field Functions)

CR ADEN LL_ADC_IsEnabled

Note

On this STM32 series, flag LL_ADC_FLAG_ADRDY is raised when the ADC is enabled and when conversion clock is active. (not only core clock: this ADC has a dual clock domain)

Parameters :

p_adc – Pointer to ADC instance

Return values :

0 – ADC is disabled, 1: ADC is enabled.

uint32_t LL_ADC_IsDisableOngoing ( const ADC_TypeDef * p_adc )

Get the selected ADC instance disable state.

Reference Manual to LL API cross reference (Register Field Functions)

CR ADDIS LL_ADC_IsDisableOngoing

Parameters :

p_adc – Pointer to ADC instance

Return values :

0 – no ADC disable command on going.

void LL_ADC_StartCalibration ( ADC_TypeDef * p_adc , uint32_t CalibrationMode )

Start ADC calibration in the mode single-ended or differential (for devices with differential mode available).

Reference Manual to LL API cross reference (Register Field Functions)

CR ADCAL LL_ADC_StartCalibration

CR ADCALDIF LL_ADC_StartCalibration

CR ADCALLIN LL_ADC_StartCalibration

Note

On this STM32 series, a minimum number of ADC clock cycles are required between ADC end of calibration and ADC enable. Refer to literal LL_ADC_DELAY_CALIB_ENABLE_ADC_CYCLES .

Note

Calibration duration:

  • Calibration of offset: 520 ADC clock cycles

  • Calibration of linearity: 131072 ADC clock cycles

Note

For devices with differential mode available: Calibration of offset is specific to each of single-ended and differential modes (calibration run must be performed for each of these differential modes, if used afterwards and if the application requires their calibration). Calibration of linearity is common to both single-ended and differential modes (calibration run can be performed only once).

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be ADC disabled.

Parameters :
uint32_t LL_ADC_IsCalibrationOnGoing ( const ADC_TypeDef * p_adc )

Get ADC calibration state.

Reference Manual to LL API cross reference (Register Field Functions)

CR ADCAL LL_ADC_IsCalibrationOnGoing

Parameters :

p_adc – Pointer to ADC instance

Return values :

0 – calibration complete, 1: calibration in progress.

Operation on ADC hierarchical scope: group regular

group ADC_LL_EF_Operation_ADC_Group_Regular

Functions

void LL_ADC_REG_StartConversion ( ADC_TypeDef * p_adc )

Start ADC group regular conversion.

Reference Manual to LL API cross reference (Register Field Functions)

CR ADSTART LL_ADC_REG_StartConversion

Note

On this STM32 series, this function is relevant for both internal trigger (SW start) and external trigger:

  • If ADC trigger has been set to software start, ADC conversion starts immediately.

  • If ADC trigger has been set to external trigger, ADC conversion will start at next trigger event (on the selected trigger edge) following the ADC start conversion command.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be enabled without conversion on going on group regular, without conversion stop command on going on group regular, without ADC disable command on going.

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_REG_StopConversion ( ADC_TypeDef * p_adc )

Stop ADC group regular conversion.

Reference Manual to LL API cross reference (Register Field Functions)

CR ADSTP LL_ADC_REG_StopConversion

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be enabled with conversion on going on group regular, without ADC disable command on going.

Parameters :

p_adc – Pointer to ADC instance

uint32_t LL_ADC_REG_IsConversionOngoing ( const ADC_TypeDef * p_adc )

Get ADC group regular conversion state.

Reference Manual to LL API cross reference (Register Field Functions)

CR ADSTART LL_ADC_REG_IsConversionOngoing

Parameters :

p_adc – Pointer to ADC instance

Return values :

0 – no conversion is on going on ADC group regular.

uint32_t LL_ADC_REG_IsStopConversionOngoing ( const ADC_TypeDef * p_adc )

Get ADC group regular command of conversion stop state.

Reference Manual to LL API cross reference (Register Field Functions)

CR ADSTP LL_ADC_REG_IsStopConversionOngoing

Parameters :

p_adc – Pointer to ADC instance

Return values :

0 – no command of conversion stop is on going on ADC group regular.

int32_t LL_ADC_REG_ReadConversionData ( const ADC_TypeDef * p_adc )

Get ADC group regular conversion data, range fit for all ADC configurations: all ADC resolutions, features extending data width (oversampling, data shift, …) and features changing data sign (offset).

Reference Manual to LL API cross reference (Register Field Functions)

DR RDATA LL_ADC_REG_ReadConversionData

Parameters :

p_adc – Pointer to ADC instance

Return values :

Signed – value (can be negative after post-processing computation: offset feature) between Min_Data=-2147483648 (two’s complement 0x80000000) and Max_Data=+2147483647 (0x7FFFFFFF)

uint32_t LL_ADC_REG_ReadConversionData32 ( const ADC_TypeDef * p_adc )

Get ADC group regular conversion data, range fit for ADC configurations with all ADC resolutions, features extending data width (oversampling, data shift, …) but not features changing data sign (offset).

Reference Manual to LL API cross reference (Register Field Functions)

DR RDATA LL_ADC_REG_ReadConversionData32

Note

To get data handling all ADC configurations, use default function LL_ADC_REG_ReadConversionData() .

Parameters :

p_adc – Pointer to ADC instance

Return values :

Value – between Min_Data=0x00000000 and Max_Data=0xFFFFFFFF

uint16_t LL_ADC_REG_ReadConversionData16 ( const ADC_TypeDef * p_adc )

Get ADC group regular conversion data, range fit for data width 16 bits and unsigned.

Reference Manual to LL API cross reference (Register Field Functions)

DR RDATA LL_ADC_REG_ReadConversionData16

Note

To get data handling all ADC configurations, use default function LL_ADC_REG_ReadConversionData() .

Parameters :

p_adc – Pointer to ADC instance

Return values :

Value – between Min_Data=0x00 and Max_Data=0xFFFF

uint16_t LL_ADC_REG_ReadConversionData14 ( const ADC_TypeDef * p_adc )

Get ADC group regular conversion data, range fit for data width 14 bits and unsigned.

Reference Manual to LL API cross reference (Register Field Functions)

DR RDATA LL_ADC_REG_ReadConversionData14

Note

To get data handling all ADC configurations, use default function LL_ADC_REG_ReadConversionData() .

Parameters :

p_adc – Pointer to ADC instance

Return values :

Value – between Min_Data=0x00 and Max_Data=0x3FF

uint16_t LL_ADC_REG_ReadConversionData12 ( const ADC_TypeDef * p_adc )

Get ADC group regular conversion data, range fit for data width 12 bits and unsigned.

Reference Manual to LL API cross reference (Register Field Functions)

DR RDATA LL_ADC_REG_ReadConversionData12

Note

To get data handling all ADC configurations, use default function LL_ADC_REG_ReadConversionData() .

Parameters :

p_adc – Pointer to ADC instance

Return values :

Value – between Min_Data=0x000 and Max_Data=0xFFF

uint16_t LL_ADC_REG_ReadConversionData10 ( const ADC_TypeDef * p_adc )

Get ADC group regular conversion data, range fit for data width 10 bits and unsigned.

Reference Manual to LL API cross reference (Register Field Functions)

DR RDATA LL_ADC_REG_ReadConversionData10

Note

To get data handling all ADC configurations, use default function LL_ADC_REG_ReadConversionData() .

Parameters :

p_adc – Pointer to ADC instance

Return values :

Value – between Min_Data=0x000 and Max_Data=0x3FF

uint8_t LL_ADC_REG_ReadConversionData8 ( const ADC_TypeDef * p_adc )

Get ADC group regular conversion data, range fit for data width 8 bits and unsigned.

Reference Manual to LL API cross reference (Register Field Functions)

DR RDATA LL_ADC_REG_ReadConversionData8

Note

To get data handling all ADC configurations, use default function LL_ADC_REG_ReadConversionData() .

Parameters :

p_adc – Pointer to ADC instance

Return values :

Value – between Min_Data=0x00 and Max_Data=0xFF

uint8_t LL_ADC_REG_ReadConversionData6 ( const ADC_TypeDef * p_adc )

Get ADC group regular conversion data, range fit for data width 6 bits and unsigned.

Reference Manual to LL API cross reference (Register Field Functions)

DR RDATA LL_ADC_REG_ReadConversionData8

Note

To get data handling all ADC configurations, use default function LL_ADC_REG_ReadConversionData() .

Parameters :

p_adc – Pointer to ADC instance

Return values :

Value – between Min_Data=0x00 and Max_Data=0xFF

uint32_t LL_ADC_REG_ReadMultiConversionData32 ( const ADC_Common_TypeDef * p_adc_common , uint32_t ConversionData )

Get ADC multimode conversion data of ADC master, ADC slave or raw data with ADC master and slave concatenated.

Reference Manual to LL API cross reference (Register Field Functions)

CDR RDATA_MST LL_ADC_REG_ReadMultiConversionData32

CDR RDATA_SLV LL_ADC_REG_ReadMultiConversionData32

Note

This function is relevant only for ADC multimode group regular data format with packing: each ADC conversion data concatenated in a single register (refer to LL_ADC_MULTI_REG_DMA_RES_32_10B , LL_ADC_MULTI_REG_DMA_RES_8B ).

Note

Each ADC conversion data width is limited to 8 or 16 bits depending on data packing setting. If expected data width is wider (this can be the case with features extending data width (oversampling, data shift,…), others services must be used:

  • function “LL_ADC_REG_ReadConversionData()” for each ADC instance part of multimode.

  • multimode functions with data transfer by DMA.

Note

Returned value is unsigned, due to concatenation of multiple data. In case of signed data expected (with features changing data sign: offset), use function “LL_ADC_REG_ReadConversionData()” for each ADC instance part of multimode.

Note

If raw data with ADC master and slave concatenated is retrieved, 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() . (however this macro is mainly intended for multimode transfer by DMA, because this function can do the same by getting multimode conversion data of ADC master or ADC slave separately).

Parameters :
Return values :

Value – between Min_Data=0x00000000 and Max_Data=0xFFFFFFFF

Operation on ADC hierarchical scope: group injected

group ADC_LL_EF_Operation_ADC_Group_Injected

Functions

void LL_ADC_INJ_StartConversion ( ADC_TypeDef * p_adc )

Start ADC group injected conversion.

Reference Manual to LL API cross reference (Register Field Functions)

CR JADSTART LL_ADC_INJ_StartConversion

Note

On this STM32 series, this function is relevant for both internal trigger (SW start) and external trigger:

  • If ADC trigger has been set to software start, ADC conversion starts immediately.

  • If ADC trigger has been set to external trigger, ADC conversion will start at next trigger event (on the selected trigger edge) following the ADC start conversion command.

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be enabled without conversion on going on group injected, without conversion stop command on going on group injected, without ADC disable command on going.

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_INJ_StopConversion ( ADC_TypeDef * p_adc )

Stop ADC group injected conversion.

Reference Manual to LL API cross reference (Register Field Functions)

CR JADSTP LL_ADC_INJ_StopConversion

Note

On this STM32 series, setting of this feature is conditioned to ADC state: ADC must be enabled with conversion on going on group injected, without ADC disable command on going.

Parameters :

p_adc – Pointer to ADC instance

uint32_t LL_ADC_INJ_IsConversionOngoing ( const ADC_TypeDef * p_adc )

Get ADC group injected conversion state.

Reference Manual to LL API cross reference (Register Field Functions)

CR JADSTART LL_ADC_INJ_IsConversionOngoing

Parameters :

p_adc – Pointer to ADC instance

Return values :

0 – no conversion is on going on ADC group injected.

uint32_t LL_ADC_INJ_IsStopConversionOngoing ( const ADC_TypeDef * p_adc )

Get ADC group injected command of conversion stop state.

Reference Manual to LL API cross reference (Register Field Functions)

CR JADSTP LL_ADC_INJ_IsStopConversionOngoing

Parameters :

p_adc – Pointer to ADC instance

Return values :

0 – no command of conversion stop is on going on ADC group injected.

int32_t LL_ADC_INJ_ReadConversionData ( const ADC_TypeDef * p_adc , uint32_t rank )

Get ADC group injected conversion data, range fit for all ADC configurations: all ADC resolutions, features extending data width (oversampling, data shift, …) and features changing data sign (offset).

Reference Manual to LL API cross reference (Register Field Functions)

JDR1 JDATA LL_ADC_INJ_ReadConversionData

JDR2 JDATA LL_ADC_INJ_ReadConversionData

JDR3 JDATA LL_ADC_INJ_ReadConversionData

JDR4 JDATA LL_ADC_INJ_ReadConversionData

Parameters :
Return values :

Signed – value (can be negative after post-processing computation: offset feature) between Min_Data=-2147483648 (two’s complement 0x80000000) and Max_Data=+2147483647 (0x7FFFFFFF)

uint32_t LL_ADC_INJ_ReadConversionData32 ( const ADC_TypeDef * p_adc , uint32_t rank )

Get ADC group injected conversion data, range fit for ADC configurations with all ADC resolutions, features extending data width (oversampling, data shift, …) but not features changing data sign (offset).

Reference Manual to LL API cross reference (Register Field Functions)

JDR1 JDATA LL_ADC_INJ_ReadConversionData32

JDR2 JDATA LL_ADC_INJ_ReadConversionData32

JDR3 JDATA LL_ADC_INJ_ReadConversionData32

JDR4 JDATA LL_ADC_INJ_ReadConversionData32

Note

To get data handling all ADC configurations, use default function LL_ADC_INJ_ReadConversionData() .

Parameters :
Return values :

Value – between Min_Data=0x00000000 and Max_Data=0xFFFFFFFF

uint16_t LL_ADC_INJ_ReadConversionData16 ( const ADC_TypeDef * p_adc , uint32_t rank )

Get ADC group injected conversion data, range fit for data width 16 bits and unsigned.

Reference Manual to LL API cross reference (Register Field Functions)

JDR1 JDATA LL_ADC_INJ_ReadConversionData16

JDR2 JDATA LL_ADC_INJ_ReadConversionData16

JDR3 JDATA LL_ADC_INJ_ReadConversionData16

JDR4 JDATA LL_ADC_INJ_ReadConversionData16

Note

To get data handling all ADC configurations, use default function LL_ADC_INJ_ReadConversionData() .

Parameters :
Return values :

Value – between Min_Data=0x000 and Max_Data=0xFFFF

uint16_t LL_ADC_INJ_ReadConversionData14 ( const ADC_TypeDef * p_adc , uint32_t rank )

Get ADC group injected conversion data, range fit for data width 14 bits and unsigned.

Reference Manual to LL API cross reference (Register Field Functions)

JDR1 JDATA LL_ADC_INJ_ReadConversionData14

JDR2 JDATA LL_ADC_INJ_ReadConversionData14

JDR3 JDATA LL_ADC_INJ_ReadConversionData14

JDR4 JDATA LL_ADC_INJ_ReadConversionData14

Note

To get data handling all ADC configurations, use default function LL_ADC_INJ_ReadConversionData() .

Parameters :
Return values :

Value – between Min_Data=0x000 and Max_Data=0x3FFF

uint16_t LL_ADC_INJ_ReadConversionData12 ( const ADC_TypeDef * p_adc , uint32_t rank )

Get ADC group injected conversion data, range fit for data width 12 bits and unsigned.

Reference Manual to LL API cross reference (Register Field Functions)

JDR1 JDATA LL_ADC_INJ_ReadConversionData12

JDR2 JDATA LL_ADC_INJ_ReadConversionData12

JDR3 JDATA LL_ADC_INJ_ReadConversionData12

JDR4 JDATA LL_ADC_INJ_ReadConversionData12

Note

To get data handling all ADC configurations, use default function LL_ADC_INJ_ReadConversionData() .

Parameters :
Return values :

Value – between Min_Data=0x000 and Max_Data=0xFFF

uint16_t LL_ADC_INJ_ReadConversionData10 ( const ADC_TypeDef * p_adc , uint32_t rank )

Get ADC group injected conversion data, range fit for data width 10 bits and unsigned.

Reference Manual to LL API cross reference (Register Field Functions)

JDR1 JDATA LL_ADC_INJ_ReadConversionData10

JDR2 JDATA LL_ADC_INJ_ReadConversionData10

JDR3 JDATA LL_ADC_INJ_ReadConversionData10

JDR4 JDATA LL_ADC_INJ_ReadConversionData10

Note

To get data handling all ADC configurations, use default function LL_ADC_INJ_ReadConversionData() .

Parameters :
Return values :

Value – between Min_Data=0x000 and Max_Data=0x3FF

uint8_t LL_ADC_INJ_ReadConversionData8 ( const ADC_TypeDef * p_adc , uint32_t rank )

Get ADC group injected conversion data, range fit for data width 8 bits and unsigned.

Reference Manual to LL API cross reference (Register Field Functions)

JDR1 JDATA LL_ADC_INJ_ReadConversionData8

JDR2 JDATA LL_ADC_INJ_ReadConversionData8

JDR3 JDATA LL_ADC_INJ_ReadConversionData8

JDR4 JDATA LL_ADC_INJ_ReadConversionData8

Note

To get data handling all ADC configurations, use default function LL_ADC_INJ_ReadConversionData() .

Parameters :
Return values :

Value – between Min_Data=0x00 and Max_Data=0xFF

ADC flag management

group ADC_LL_EF_FLAG_Management

Functions

uint32_t LL_ADC_IsActiveFlag ( const ADC_TypeDef * p_adc , uint32_t flag )

Get ADC flag.

Reference Manual to LL API cross reference (Register Field Functions)

ISR ADRDY LL_ADC_IsActiveFlag

ISR EOC LL_ADC_IsActiveFlag

ISR EOS LL_ADC_IsActiveFlag

ISR OVR LL_ADC_IsActiveFlag

ISR EOSMP LL_ADC_IsActiveFlag

ISR JEOC LL_ADC_IsActiveFlag

ISR JEOS LL_ADC_IsActiveFlag

ISR AWD1 LL_ADC_IsActiveFlag

ISR AWD2 LL_ADC_IsActiveFlag

ISR AWD3 LL_ADC_IsActiveFlag

ISR EOCAL LL_ADC_IsActiveFlag

ISR LDORDY LL_ADC_IsActiveFlag

Note

Generic function with flag selected as parameter. Optimized functions for each flag are available.

Parameters :
Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_ADRDY ( const ADC_TypeDef * p_adc )

Get flag ADC ready.

Reference Manual to LL API cross reference (Register Field Functions)

ISR ADRDY LL_ADC_IsActiveFlag_ADRDY

Note

On this STM32 series, flag LL_ADC_FLAG_ADRDY is raised when the ADC is enabled and when conversion clock is active. (not only core clock: this ADC has a dual clock domain)

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_EOC ( const ADC_TypeDef * p_adc )

Get flag ADC group regular end of unitary conversion.

Reference Manual to LL API cross reference (Register Field Functions)

ISR EOC LL_ADC_IsActiveFlag_EOC

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_EOS ( const ADC_TypeDef * p_adc )

Get flag ADC group regular end of sequence conversions.

Reference Manual to LL API cross reference (Register Field Functions)

ISR EOS LL_ADC_IsActiveFlag_EOS

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_OVR ( const ADC_TypeDef * p_adc )

Get flag ADC group regular overrun.

Reference Manual to LL API cross reference (Register Field Functions)

ISR OVR LL_ADC_IsActiveFlag_OVR

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_EOSMP ( const ADC_TypeDef * p_adc )

Get flag ADC group regular end of sampling phase.

Reference Manual to LL API cross reference (Register Field Functions)

ISR EOSMP LL_ADC_IsActiveFlag_EOSMP

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_JEOC ( const ADC_TypeDef * p_adc )

Get flag ADC group injected end of unitary conversion.

Reference Manual to LL API cross reference (Register Field Functions)

ISR JEOC LL_ADC_IsActiveFlag_JEOC

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_JEOS ( const ADC_TypeDef * p_adc )

Get flag ADC group injected end of sequence conversions.

Reference Manual to LL API cross reference (Register Field Functions)

ISR JEOS LL_ADC_IsActiveFlag_JEOS

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_AWD1 ( const ADC_TypeDef * p_adc )

Get flag ADC analog watchdog 1 out of window event.

Reference Manual to LL API cross reference (Register Field Functions)

ISR AWD1 LL_ADC_IsActiveFlag_AWD1

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_AWD2 ( const ADC_TypeDef * p_adc )

Get flag ADC analog watchdog 2 out of window event.

Reference Manual to LL API cross reference (Register Field Functions)

ISR AWD2 LL_ADC_IsActiveFlag_AWD2

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_AWD3 ( const ADC_TypeDef * p_adc )

Get flag ADC analog watchdog 3 out of window event.

Reference Manual to LL API cross reference (Register Field Functions)

ISR AWD3 LL_ADC_IsActiveFlag_AWD3

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_EOCAL ( const ADC_TypeDef * p_adc )

Get flag ADC end of calibration.

Reference Manual to LL API cross reference (Register Field Functions)

ISR EOCAL LL_ADC_IsActiveFlag_EOCAL

Note

On this STM32 series, flag LL_ADC_FLAG_ADRDY is raised when the ADC is enabled and when conversion clock is active. (not only core clock: this ADC has a dual clock domain)

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_LDORDY ( const ADC_TypeDef * p_adc )

Get flag ADC internal voltage regulator (LDO) ready.

Reference Manual to LL API cross reference (Register Field Functions)

ISR LDORDY LL_ADC_IsActiveFlag_LDORDY

Note

On this STM32 series, this flag indicates LDO state in different way depending on ADC instances:

  • ADC4: latched as other flags, clear flag function available

  • ADC1, ADC2 (if available): current state (not latched as other flags, no clear flag function)

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

void LL_ADC_ClearFlag ( ADC_TypeDef * p_adc , uint32_t flag )

Clear ADC flag.

Reference Manual to LL API cross reference (Register Field Functions)

ISR ADRDY LL_ADC_ClearFlag

ISR EOC LL_ADC_ClearFlag

ISR EOS LL_ADC_ClearFlag

ISR OVR LL_ADC_ClearFlag

ISR EOSMP LL_ADC_ClearFlag

ISR JEOC LL_ADC_ClearFlag

ISR JEOS LL_ADC_ClearFlag

ISR AWD1 LL_ADC_ClearFlag

ISR AWD2 LL_ADC_ClearFlag

ISR AWD3 LL_ADC_ClearFlag

ISR EOCAL LL_ADC_ClearFlag

ISR LDORDY LL_ADC_ClearFlag

Note

Generic function with flag selected as parameter. Optimized functions for each flag are available.

Parameters :
void LL_ADC_ClearFlag_ADRDY ( ADC_TypeDef * p_adc )

Clear flag ADC ready.

Reference Manual to LL API cross reference (Register Field Functions)

ISR ADRDY LL_ADC_ClearFlag_ADRDY

Note

On this STM32 series, flag LL_ADC_FLAG_ADRDY is raised when the ADC is enabled and when conversion clock is active. (not only core clock: this ADC has a dual clock domain)

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_ClearFlag_EOC ( ADC_TypeDef * p_adc )

Clear flag ADC group regular end of unitary conversion.

Reference Manual to LL API cross reference (Register Field Functions)

ISR EOC LL_ADC_ClearFlag_EOC

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_ClearFlag_EOS ( ADC_TypeDef * p_adc )

Clear flag ADC group regular end of sequence conversions.

Reference Manual to LL API cross reference (Register Field Functions)

ISR EOS LL_ADC_ClearFlag_EOS

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_ClearFlag_OVR ( ADC_TypeDef * p_adc )

Clear flag ADC group regular overrun.

Reference Manual to LL API cross reference (Register Field Functions)

ISR OVR LL_ADC_ClearFlag_OVR

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_ClearFlag_EOSMP ( ADC_TypeDef * p_adc )

Clear flag ADC group regular end of sampling phase.

Reference Manual to LL API cross reference (Register Field Functions)

ISR EOSMP LL_ADC_ClearFlag_EOSMP

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_ClearFlag_JEOC ( ADC_TypeDef * p_adc )

Clear flag ADC group injected end of unitary conversion.

Reference Manual to LL API cross reference (Register Field Functions)

ISR JEOC LL_ADC_ClearFlag_JEOC

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_ClearFlag_JEOS ( ADC_TypeDef * p_adc )

Clear flag ADC group injected end of sequence conversions.

Reference Manual to LL API cross reference (Register Field Functions)

ISR JEOS LL_ADC_ClearFlag_JEOS

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_ClearFlag_AWD1 ( ADC_TypeDef * p_adc )

Clear flag ADC analog watchdog 1 out of window event.

Reference Manual to LL API cross reference (Register Field Functions)

ISR AWD1 LL_ADC_ClearFlag_AWD1

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_ClearFlag_AWD2 ( ADC_TypeDef * p_adc )

Clear flag ADC analog watchdog 2 out of window event.

Reference Manual to LL API cross reference (Register Field Functions)

ISR AWD2 LL_ADC_ClearFlag_AWD2

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_ClearFlag_AWD3 ( ADC_TypeDef * p_adc )

Clear flag ADC analog watchdog 3 out of window event.

Reference Manual to LL API cross reference (Register Field Functions)

ISR AWD3 LL_ADC_ClearFlag_AWD3

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_ClearFlag_EOCAL ( ADC_TypeDef * p_adc )

Clear flag ADC end of calibration.

Reference Manual to LL API cross reference (Register Field Functions)

ISR EOCAL LL_ADC_ClearFlag_EOCAL

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_ClearFlag_LDORDY ( ADC_TypeDef * p_adc )

Clear flag ADC internal voltage regulator (LDO) ready.

Reference Manual to LL API cross reference (Register Field Functions)

ISR LDORDY LL_ADC_ClearFlag_LDORDY

Note

On this STM32 series, this flag indicates LDO state in different way depending on ADC instances:

  • ADC4: latched as other flags, clear flag function available

  • ADC1, ADC2 (if available): current state (not latched as other flags, no clear flag function)

Parameters :

p_adc – Pointer to ADC instance

uint32_t LL_ADC_IsActiveFlag_MST_ADRDY ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC ready of the ADC master.

Reference Manual to LL API cross reference (Register Field Functions)

CSR ADRDY_MST LL_ADC_IsActiveFlag_MST_ADRDY

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_SLV_ADRDY ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC ready of the ADC slave.

Reference Manual to LL API cross reference (Register Field Functions)

CSR ADRDY_SLV LL_ADC_IsActiveFlag_SLV_ADRDY

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_MST_EOC ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC group regular end of unitary conversion of the ADC master.

Reference Manual to LL API cross reference (Register Field Functions)

CSR EOC_MST LL_ADC_IsActiveFlag_MST_EOC

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_SLV_EOC ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC group regular end of unitary conversion of the ADC slave.

Reference Manual to LL API cross reference (Register Field Functions)

CSR EOC_SLV LL_ADC_IsActiveFlag_SLV_EOC

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_MST_EOS ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC group regular end of sequence conversions of the ADC master.

Reference Manual to LL API cross reference (Register Field Functions)

CSR EOS_MST LL_ADC_IsActiveFlag_MST_EOS

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_SLV_EOS ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC group regular end of sequence conversions of the ADC slave.

Reference Manual to LL API cross reference (Register Field Functions)

CSR EOS_SLV LL_ADC_IsActiveFlag_SLV_EOS

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_MST_OVR ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC group regular overrun of the ADC master.

Reference Manual to LL API cross reference (Register Field Functions)

CSR OVR_MST LL_ADC_IsActiveFlag_MST_OVR

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_SLV_OVR ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC group regular overrun of the ADC slave.

Reference Manual to LL API cross reference (Register Field Functions)

CSR OVR_SLV LL_ADC_IsActiveFlag_SLV_OVR

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_MST_EOSMP ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC group regular end of sampling of the ADC master.

Reference Manual to LL API cross reference (Register Field Functions)

CSR EOSMP_MST LL_ADC_IsActiveFlag_MST_EOSMP

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_SLV_EOSMP ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC group regular end of sampling of the ADC slave.

Reference Manual to LL API cross reference (Register Field Functions)

CSR EOSMP_SLV LL_ADC_IsActiveFlag_SLV_EOSMP

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_MST_JEOC ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC group injected end of unitary conversion of the ADC master.

Reference Manual to LL API cross reference (Register Field Functions)

CSR JEOC_MST LL_ADC_IsActiveFlag_MST_JEOC

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_SLV_JEOC ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC group injected end of unitary conversion of the ADC slave.

Reference Manual to LL API cross reference (Register Field Functions)

CSR JEOC_SLV LL_ADC_IsActiveFlag_SLV_JEOC

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_MST_JEOS ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC group injected end of sequence conversions of the ADC master.

Reference Manual to LL API cross reference (Register Field Functions)

CSR JEOS_MST LL_ADC_IsActiveFlag_MST_JEOS

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_SLV_JEOS ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC group injected end of sequence conversions of the ADC slave.

Reference Manual to LL API cross reference (Register Field Functions)

CSR JEOS_SLV LL_ADC_IsActiveFlag_SLV_JEOS

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_MST_AWD1 ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC analog watchdog 1 of the ADC master.

Reference Manual to LL API cross reference (Register Field Functions)

CSR AWD1_MST LL_ADC_IsActiveFlag_MST_AWD1

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_SLV_AWD1 ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode analog watchdog 1 of the ADC slave.

Reference Manual to LL API cross reference (Register Field Functions)

CSR AWD1_SLV LL_ADC_IsActiveFlag_SLV_AWD1

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_MST_AWD2 ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC analog watchdog 2 of the ADC master.

Reference Manual to LL API cross reference (Register Field Functions)

CSR AWD2_MST LL_ADC_IsActiveFlag_MST_AWD2

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_SLV_AWD2 ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC analog watchdog 2 of the ADC slave.

Reference Manual to LL API cross reference (Register Field Functions)

CSR AWD2_SLV LL_ADC_IsActiveFlag_SLV_AWD2

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_MST_AWD3 ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC analog watchdog 3 of the ADC master.

Reference Manual to LL API cross reference (Register Field Functions)

CSR AWD3_MST LL_ADC_IsActiveFlag_MST_AWD3

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_SLV_AWD3 ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC analog watchdog 3 of the ADC slave.

Reference Manual to LL API cross reference (Register Field Functions)

CSR AWD3_SLV LL_ADC_IsActiveFlag_SLV_AWD3

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_MST_LDORDY ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC internal voltage regulator (LDO) ready of the ADC master.

Reference Manual to LL API cross reference (Register Field Functions)

CSR LDORDY_MST LL_ADC_IsActiveFlag_MST_LDORDY

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsActiveFlag_SLV_LDORDY ( const ADC_Common_TypeDef * p_adc_common )

Get flag multimode ADC internal voltage regulator (LDO) ready of the ADC slave.

Reference Manual to LL API cross reference (Register Field Functions)

CSR LDORDY_SLV LL_ADC_IsActiveFlag_SLV_LDORDY

Parameters :

p_adc_common – Pointer to ADC common instance (can be set directly from CMSIS definition ADCxy_COMMON or using helper macro ADC_COMMON_INSTANCE())

Return values :

State – of bit (1 or 0).

ADC IT management

group ADC_LL_EF_IT_Management

Functions

void LL_ADC_EnableIT ( ADC_TypeDef * p_adc , uint32_t it )

Enable ADC interruption.

Reference Manual to LL API cross reference (Register Field Functions)

IER ADRDY LL_ADC_EnableIT

IER EOC LL_ADC_EnableIT

IER EOS LL_ADC_EnableIT

IER OVR LL_ADC_EnableIT

IER EOSMP LL_ADC_EnableIT

IER JEOC LL_ADC_EnableIT

IER JEOS LL_ADC_EnableIT

IER AWD1 LL_ADC_EnableIT

IER AWD2 LL_ADC_EnableIT

IER AWD3 LL_ADC_EnableIT

IER EOCAL LL_ADC_EnableIT

IER LDORDY LL_ADC_EnableIT

Note

Generic function with flag selected as parameter. Optimized functions for each flag are available.

Parameters :
void LL_ADC_EnableIT_ADRDY ( ADC_TypeDef * p_adc )

Enable ADC ready.

Reference Manual to LL API cross reference (Register Field Functions)

IER ADRDYIE LL_ADC_EnableIT_ADRDY

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_EnableIT_EOC ( ADC_TypeDef * p_adc )

Enable interruption ADC group regular end of unitary conversion.

Reference Manual to LL API cross reference (Register Field Functions)

IER EOCIE LL_ADC_EnableIT_EOC

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_EnableIT_EOS ( ADC_TypeDef * p_adc )

Enable interruption ADC group regular end of sequence conversions.

Reference Manual to LL API cross reference (Register Field Functions)

IER EOSIE LL_ADC_EnableIT_EOS

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_EnableIT_OVR ( ADC_TypeDef * p_adc )

Enable ADC group regular interruption overrun.

Reference Manual to LL API cross reference (Register Field Functions)

IER OVRIE LL_ADC_EnableIT_OVR

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_EnableIT_EOSMP ( ADC_TypeDef * p_adc )

Enable interruption ADC group regular end of sampling.

Reference Manual to LL API cross reference (Register Field Functions)

IER EOSMPIE LL_ADC_EnableIT_EOSMP

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_EnableIT_JEOC ( ADC_TypeDef * p_adc )

Enable interruption ADC group injected end of unitary conversion.

Reference Manual to LL API cross reference (Register Field Functions)

IER JEOCIE LL_ADC_EnableIT_JEOC

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_EnableIT_JEOS ( ADC_TypeDef * p_adc )

Enable interruption ADC group injected end of sequence conversions.

Reference Manual to LL API cross reference (Register Field Functions)

IER JEOSIE LL_ADC_EnableIT_JEOS

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_EnableIT_AWD1 ( ADC_TypeDef * p_adc )

Enable interruption ADC analog watchdog 1.

Reference Manual to LL API cross reference (Register Field Functions)

IER AWD1IE LL_ADC_EnableIT_AWD1

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_EnableIT_AWD2 ( ADC_TypeDef * p_adc )

Enable interruption ADC analog watchdog 2.

Reference Manual to LL API cross reference (Register Field Functions)

IER AWD2IE LL_ADC_EnableIT_AWD2

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_EnableIT_AWD3 ( ADC_TypeDef * p_adc )

Enable interruption ADC analog watchdog 3.

Reference Manual to LL API cross reference (Register Field Functions)

IER AWD3IE LL_ADC_EnableIT_AWD3

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_EnableIT_EOCAL ( ADC_TypeDef * p_adc )

Enable interruption ADC end of calibration.

Reference Manual to LL API cross reference (Register Field Functions)

IER EOCALIE LL_ADC_EnableIT_EOCAL

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_DisableIT ( ADC_TypeDef * p_adc , uint32_t it )

Disable ADC interruption.

Reference Manual to LL API cross reference (Register Field Functions)

IER ADRDY LL_ADC_DisableIT

IER EOC LL_ADC_DisableIT

IER EOS LL_ADC_DisableIT

IER OVR LL_ADC_DisableIT

IER EOSMP LL_ADC_DisableIT

IER JEOC LL_ADC_DisableIT

IER JEOS LL_ADC_DisableIT

IER AWD1 LL_ADC_DisableIT

IER AWD2 LL_ADC_DisableIT

IER AWD3 LL_ADC_DisableIT

IER EOCAL LL_ADC_DisableIT

IER LDORDY LL_ADC_DisableIT

Note

Generic function with flag selected as parameter. Optimized functions for each flag are also available.

Parameters :
void LL_ADC_DisableIT_ADRDY ( ADC_TypeDef * p_adc )

Disable interruption ADC ready.

Reference Manual to LL API cross reference (Register Field Functions)

IER ADRDYIE LL_ADC_DisableIT_ADRDY

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_DisableIT_EOC ( ADC_TypeDef * p_adc )

Disable interruption ADC group regular end of unitary conversion.

Reference Manual to LL API cross reference (Register Field Functions)

IER EOCIE LL_ADC_DisableIT_EOC

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_DisableIT_EOS ( ADC_TypeDef * p_adc )

Disable interruption ADC group regular end of sequence conversions.

Reference Manual to LL API cross reference (Register Field Functions)

IER EOSIE LL_ADC_DisableIT_EOS

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_DisableIT_OVR ( ADC_TypeDef * p_adc )

Disable interruption ADC group regular overrun.

Reference Manual to LL API cross reference (Register Field Functions)

IER OVRIE LL_ADC_DisableIT_OVR

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_DisableIT_EOSMP ( ADC_TypeDef * p_adc )

Disable interruption ADC group regular end of sampling.

Reference Manual to LL API cross reference (Register Field Functions)

IER EOSMPIE LL_ADC_DisableIT_EOSMP

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_DisableIT_JEOC ( ADC_TypeDef * p_adc )

Disable interruption ADC group regular end of unitary conversion.

Reference Manual to LL API cross reference (Register Field Functions)

IER JEOCIE LL_ADC_DisableIT_JEOC

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_DisableIT_JEOS ( ADC_TypeDef * p_adc )

Disable interruption ADC group injected end of sequence conversions.

Reference Manual to LL API cross reference (Register Field Functions)

IER JEOSIE LL_ADC_DisableIT_JEOS

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_DisableIT_AWD1 ( ADC_TypeDef * p_adc )

Disable interruption ADC analog watchdog 1.

Reference Manual to LL API cross reference (Register Field Functions)

IER AWD1IE LL_ADC_DisableIT_AWD1

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_DisableIT_AWD2 ( ADC_TypeDef * p_adc )

Disable interruption ADC analog watchdog 2.

Reference Manual to LL API cross reference (Register Field Functions)

IER AWD2IE LL_ADC_DisableIT_AWD2

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_DisableIT_AWD3 ( ADC_TypeDef * p_adc )

Disable interruption ADC analog watchdog 3.

Reference Manual to LL API cross reference (Register Field Functions)

IER AWD3IE LL_ADC_DisableIT_AWD3

Parameters :

p_adc – Pointer to ADC instance

void LL_ADC_DisableIT_EOCAL ( ADC_TypeDef * p_adc )

Disable interruption ADC end of calibration.

Reference Manual to LL API cross reference (Register Field Functions)

IER EOCALIE LL_ADC_DisableIT_EOCAL

Parameters :

p_adc – Pointer to ADC instance

uint32_t LL_ADC_IsEnabledIT ( const ADC_TypeDef * p_adc , uint32_t it )

Get state of ADC interruption.

Reference Manual to LL API cross reference (Register Field Functions)

IER ADRDY LL_ADC_IsEnabledIT

IER EOC LL_ADC_IsEnabledIT

IER EOS LL_ADC_IsEnabledIT

IER OVR LL_ADC_IsEnabledIT

IER EOSMP LL_ADC_IsEnabledIT

IER JEOC LL_ADC_IsEnabledIT

IER JEOS LL_ADC_IsEnabledIT

IER AWD1 LL_ADC_IsEnabledIT

IER AWD2 LL_ADC_IsEnabledIT

IER AWD3 LL_ADC_IsEnabledIT

IER EOCAL LL_ADC_IsEnabledIT

IER LDORDY LL_ADC_IsEnabledIT

Note

Generic function with flag selected as parameter. Optimized functions for each flag are available.

Parameters :
Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsEnabledIT_ADRDY ( const ADC_TypeDef * p_adc )

Get state of interruption ADC ready (0: interrupt disabled, 1: interrupt enabled).

Reference Manual to LL API cross reference (Register Field Functions)

IER ADRDYIE LL_ADC_IsEnabledIT_ADRDY

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsEnabledIT_EOC ( const ADC_TypeDef * p_adc )

Get state of interruption ADC group regular end of unitary conversion (0: interrupt disabled, 1: interrupt enabled).

Reference Manual to LL API cross reference (Register Field Functions)

IER EOCIE LL_ADC_IsEnabledIT_EOC

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsEnabledIT_EOS ( const ADC_TypeDef * p_adc )

Get state of interruption ADC group regular end of sequence conversions (0: interrupt disabled, 1: interrupt enabled).

Reference Manual to LL API cross reference (Register Field Functions)

IER EOSIE LL_ADC_IsEnabledIT_EOS

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsEnabledIT_OVR ( const ADC_TypeDef * p_adc )

Get state of interruption ADC group regular overrun (0: interrupt disabled, 1: interrupt enabled).

Reference Manual to LL API cross reference (Register Field Functions)

IER OVRIE LL_ADC_IsEnabledIT_OVR

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsEnabledIT_EOSMP ( const ADC_TypeDef * p_adc )

Get state of interruption ADC group regular end of sampling (0: interrupt disabled, 1: interrupt enabled).

Reference Manual to LL API cross reference (Register Field Functions)

IER EOSMPIE LL_ADC_IsEnabledIT_EOSMP

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsEnabledIT_JEOC ( const ADC_TypeDef * p_adc )

Get state of interruption ADC group injected end of unitary conversion (0: interrupt disabled, 1: interrupt enabled).

Reference Manual to LL API cross reference (Register Field Functions)

IER JEOCIE LL_ADC_IsEnabledIT_JEOC

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsEnabledIT_JEOS ( const ADC_TypeDef * p_adc )

Get state of interruption ADC group injected end of sequence conversions (0: interrupt disabled, 1: interrupt enabled).

Reference Manual to LL API cross reference (Register Field Functions)

IER JEOSIE LL_ADC_IsEnabledIT_JEOS

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsEnabledIT_AWD1 ( const ADC_TypeDef * p_adc )

Get state of interruption ADC analog watchdog 1 out of window event. (0: interrupt disabled, 1: interrupt enabled).

Reference Manual to LL API cross reference (Register Field Functions)

IER AWD1IE LL_ADC_IsEnabledIT_AWD1

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsEnabledIT_AWD2 ( const ADC_TypeDef * p_adc )

Get state of interruption ADC analog watchdog 2 out of window event. (0: interrupt disabled, 1: interrupt enabled).

Reference Manual to LL API cross reference (Register Field Functions)

IER AWD2IE LL_ADC_IsEnabledIT_AWD2

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsEnabledIT_AWD3 ( const ADC_TypeDef * p_adc )

Get state of interruption ADC analog watchdog 3 out of window event. (0: interrupt disabled, 1: interrupt enabled).

Reference Manual to LL API cross reference (Register Field Functions)

IER AWD3IE LL_ADC_IsEnabledIT_AWD3

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).

uint32_t LL_ADC_IsEnabledIT_EOCAL ( const ADC_TypeDef * p_adc )

Get state of interruption ADC end of calibration (0: interrupt disabled, 1: interrupt enabled).

Reference Manual to LL API cross reference (Register Field Functions)

IER EOCALIE LL_ADC_IsEnabledIT_EOCAL

Parameters :

p_adc – Pointer to ADC instance

Return values :

State – of bit (1 or 0).