STM32H735xx HAL User Manual
Functions
Configuration of ADC hierarchical scope: ADC instance
ADC Exported Functions

Functions

__STATIC_INLINE void LL_ADC_SetCalibrationOffsetFactor (ADC_TypeDef *ADCx, uint32_t SingleDiff, uint32_t CalibrationFactor)
 Set ADC calibration factor in the mode single-ended or differential (for devices with differential mode available).
__STATIC_INLINE uint32_t LL_ADC_GetCalibrationOffsetFactor (ADC_TypeDef *ADCx, uint32_t SingleDiff)
 Get ADC calibration factor in the mode single-ended or differential (for devices with differential mode available).
__STATIC_INLINE void LL_ADC_SetCalibrationLinearFactor (ADC_TypeDef *ADCx, uint32_t LinearityWord, uint32_t CalibrationFactor)
 Set ADC Linear calibration factor in the mode single-ended.
__STATIC_INLINE uint32_t LL_ADC_GetCalibrationLinearFactor (ADC_TypeDef *ADCx, uint32_t LinearityWord)
 Get ADC Linear calibration factor in the mode single-ended.
__STATIC_INLINE void LL_ADC_SetResolution (ADC_TypeDef *ADCx, uint32_t Resolution)
 Set ADC resolution.
__STATIC_INLINE uint32_t LL_ADC_GetResolution (ADC_TypeDef *ADCx)
 Get ADC resolution.
__STATIC_INLINE void LL_ADC_SetLowPowerMode (ADC_TypeDef *ADCx, uint32_t LowPowerMode)
 Set ADC low power mode.
__STATIC_INLINE uint32_t LL_ADC_GetLowPowerMode (ADC_TypeDef *ADCx)
 Get ADC low power mode:
__STATIC_INLINE void LL_ADC_SetChannelPreSelection (ADC_TypeDef *ADCx, uint32_t Channel)
 Set ADC selected Channel.
__STATIC_INLINE void LL_ADC_SetOffset (ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t Channel, uint32_t OffsetLevel)
 Set ADC selected offset number 1, 2, 3 or 4.
__STATIC_INLINE uint32_t LL_ADC_GetOffsetChannel (ADC_TypeDef *ADCx, uint32_t Offsety)
 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)
__STATIC_INLINE uint32_t LL_ADC_GetOffsetLevel (ADC_TypeDef *ADCx, uint32_t Offsety)
 Get for the ADC selected offset number 1, 2, 3 or 4: Offset level (offset to be subtracted from the raw converted data).
__STATIC_INLINE void LL_ADC_SetDataRightShift (ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t RigthShift)
 Set data right shift for the ADC selected offset number 1, 2, 3 or 4: signed offset saturation if enabled or disabled.
__STATIC_INLINE uint32_t LL_ADC_GetDataRightShift (ADC_TypeDef *ADCx, uint32_t Offsety)
 Get data right shift for the ADC selected offset number 1, 2, 3 or 4: signed offset saturation if enabled or disabled.
__STATIC_INLINE void LL_ADC_SetOffsetSignedSaturation (ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetSignedSaturation)
 Set signed saturation for the ADC selected offset number 1, 2, 3 or 4: signed offset saturation if enabled or disabled.
__STATIC_INLINE uint32_t LL_ADC_GetOffsetSignedSaturation (ADC_TypeDef *ADCx, uint32_t Offsety)
 Get signed saturation for the ADC selected offset number 1, 2, 3 or 4: signed offset saturation if enabled or disabled.
__STATIC_INLINE void LL_ADC_SetOffsetSaturation (ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetSaturation)
 Set for the ADC selected offset number 1, 2, 3 or 4: choose offset saturation mode.
__STATIC_INLINE uint32_t LL_ADC_GetOffsetSaturation (ADC_TypeDef *ADCx, uint32_t Offsety)
 Get for the ADC selected offset number 1, 2, 3 or 4: offset saturation if enabled or disabled.
__STATIC_INLINE void LL_ADC_SetOffsetSign (ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetSign)
 Set for the ADC selected offset number 1, 2, 3 or 4: choose offset sign.
__STATIC_INLINE uint32_t LL_ADC_GetOffsetSign (ADC_TypeDef *ADCx, uint32_t Offsety)
 Get for the ADC selected offset number 1, 2, 3 or 4: offset sign if positive or negative.
__STATIC_INLINE void LL_ADC_SetOffsetState (ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetState)
 Set for the ADC selected offset number 1, 2, 3 or 4: force offset state disable or enable without modifying offset channel or offset value.
__STATIC_INLINE uint32_t LL_ADC_GetOffsetState (ADC_TypeDef *ADCx, uint32_t Offsety)
 Get for the ADC selected offset number 1, 2, 3 or 4: offset state disabled or enabled.

Function Documentation

__STATIC_INLINE uint32_t LL_ADC_GetCalibrationLinearFactor ( ADC_TypeDef *  ADCx,
uint32_t  LinearityWord 
)

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

Note:
Calibration factors are set by hardware after performing a calibration run using function LL_ADC_StartCalibration().
Reference Manual to LL API cross reference:
CALFACT2 LINCALFACT LL_ADC_GetCalibrationLinearFactor
CALFACT2 LINCALFACT LL_ADC_GetCalibrationLinearFactor
Parameters:
ADCxADC instance
LinearityWordThis parameter can be one of the following values:
Return values:
Valuebetween Min_Data=0x00 and Max_Data=0x3FFFFFFF

Definition at line 2949 of file stm32h7xx_ll_adc.h.

References ADC_LINEARITY_BIT_TOGGLE_TIMEOUT.

Referenced by HAL_ADCEx_LinearCalibration_GetValue().

__STATIC_INLINE uint32_t LL_ADC_GetCalibrationOffsetFactor ( ADC_TypeDef *  ADCx,
uint32_t  SingleDiff 
)

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().
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
Reference Manual to LL API cross reference:
CALFACT CALFACT_S LL_ADC_GetCalibrationOffsetFactor
CALFACT CALFACT_D LL_ADC_GetCalibrationOffsetFactor
Parameters:
ADCxADC instance
SingleDiffThis parameter can be one of the following values:
Return values:
Valuebetween Min_Data=0x00 and Max_Data=0x7F

Definition at line 2874 of file stm32h7xx_ll_adc.h.

References ADC_SINGLEDIFF_CALIB_F_BIT_D_MASK, ADC_SINGLEDIFF_CALIB_F_BIT_D_SHIFT4, and ADC_SINGLEDIFF_CALIB_FACTOR_MASK.

Referenced by HAL_ADCEx_Calibration_GetValue().

__STATIC_INLINE uint32_t LL_ADC_GetDataRightShift ( ADC_TypeDef *  ADCx,
uint32_t  Offsety 
)

Get data right shift 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:
CFGR2 RSHIFT LL_ADC_GetDataRightShift
Parameters:
ADCxADC instance
OffsetyThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 3462 of file stm32h7xx_ll_adc.h.

__STATIC_INLINE uint32_t LL_ADC_GetLowPowerMode ( ADC_TypeDef *  ADCx)

Get ADC low power mode:

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, 2. 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".
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 may be outdated: does not correspond to the current voltage level on the selected ADC channel.
Reference Manual to LL API cross reference:
CFGR AUTDLY LL_ADC_GetLowPowerMode
Parameters:
ADCxADC instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 3189 of file stm32h7xx_ll_adc.h.

__STATIC_INLINE uint32_t LL_ADC_GetOffsetChannel ( ADC_TypeDef *  ADCx,
uint32_t  Offsety 
)

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)

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().
On STM32H7, some fast channels are available: fast analog inputs coming from GPIO pads (ADC_IN0..5).
Reference Manual to LL API cross reference:
OFR1 OFFSET1_CH LL_ADC_GetOffsetChannel
OFR2 OFFSET2_CH LL_ADC_GetOffsetChannel
OFR3 OFFSET3_CH LL_ADC_GetOffsetChannel
OFR4 OFFSET4_CH LL_ADC_GetOffsetChannel
Parameters:
ADCxADC instance
OffsetyThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values: (1) On STM32H7, parameter available only on ADC instance: ADC3.
(2) On STM32H7, parameter available only on ADC instance: ADC2.
(3) On STM32H7, fast channel (0.125 us for 14-bit resolution (ADC conversion rate up to 8 Ms/s)). Other channels are slow channels (conversion rate: refer to reference manual).
(1, 2) For ADC channel read back from ADC register, comparison with internal channel parameter to be done using helper macro __LL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL().

Definition at line 3394 of file stm32h7xx_ll_adc.h.

References __ADC_PTR_REG_OFFSET.

Referenced by HAL_ADC_ConfigChannel(), and HAL_ADCEx_InjectedConfigChannel().

__STATIC_INLINE uint32_t LL_ADC_GetOffsetLevel ( ADC_TypeDef *  ADCx,
uint32_t  Offsety 
)

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

Note:
Caution: Offset format is dependent to ADC resolution: offset has to be left-aligned on bit 11, the LSB (right bits) are set to 0.
Reference Manual to LL API cross reference:
OFR1 OFFSET1 LL_ADC_GetOffsetLevel
OFR2 OFFSET2 LL_ADC_GetOffsetLevel
OFR3 OFFSET3 LL_ADC_GetOffsetLevel
OFR4 OFFSET4 LL_ADC_GetOffsetLevel
Parameters:
ADCxADC instance
OffsetyThis parameter can be one of the following values:
Return values:
Valuebetween Min_Data=0x000 and Max_Data=0x1FFFFFF

Definition at line 3420 of file stm32h7xx_ll_adc.h.

References __ADC_PTR_REG_OFFSET.

__STATIC_INLINE uint32_t LL_ADC_GetOffsetSaturation ( ADC_TypeDef *  ADCx,
uint32_t  Offsety 
)

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

Reference Manual to LL API cross reference:
OFR1 SATEN LL_ADC_GetOffsetSaturation
OFR2 SATEN LL_ADC_GetOffsetSaturation
OFR3 SATEN LL_ADC_GetOffsetSaturation
OFR4 SATEN LL_ADC_GetOffsetSaturation
Parameters:
ADCxADC instance
OffsetyThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 3585 of file stm32h7xx_ll_adc.h.

References __ADC_PTR_REG_OFFSET.

__STATIC_INLINE uint32_t LL_ADC_GetOffsetSign ( ADC_TypeDef *  ADCx,
uint32_t  Offsety 
)

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:
OFR1 OFFSETPOS LL_ADC_GetOffsetSign
OFR2 OFFSETPOS LL_ADC_GetOffsetSign
OFR3 OFFSETPOS LL_ADC_GetOffsetSign
OFR4 OFFSETPOS LL_ADC_GetOffsetSign
Parameters:
ADCxADC instance
OffsetyThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 3649 of file stm32h7xx_ll_adc.h.

References __ADC_PTR_REG_OFFSET.

__STATIC_INLINE uint32_t LL_ADC_GetOffsetSignedSaturation ( ADC_TypeDef *  ADCx,
uint32_t  Offsety 
)

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:
OFR1 SSATE LL_ADC_GetOffsetSignedSaturation
OFR2 SSATE LL_ADC_GetOffsetSignedSaturation
OFR3 SSATE LL_ADC_GetOffsetSignedSaturation
OFR4 SSATE LL_ADC_GetOffsetSignedSaturation
Parameters:
ADCxADC instance
OffsetyThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 3517 of file stm32h7xx_ll_adc.h.

References __ADC_PTR_REG_OFFSET.

__STATIC_INLINE uint32_t LL_ADC_GetOffsetState ( ADC_TypeDef *  ADCx,
uint32_t  Offsety 
)

Get for the ADC selected offset number 1, 2, 3 or 4: offset state disabled or enabled.

Reference Manual to LL API cross reference:
OFR1 OFFSET1_EN LL_ADC_GetOffsetState
OFR2 OFFSET2_EN LL_ADC_GetOffsetState
OFR3 OFFSET3_EN LL_ADC_GetOffsetState
OFR4 OFFSET4_EN LL_ADC_GetOffsetState
Parameters:
ADCxADC instance
OffsetyThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 3723 of file stm32h7xx_ll_adc.h.

References __ADC_PTR_REG_OFFSET.

__STATIC_INLINE uint32_t LL_ADC_GetResolution ( ADC_TypeDef *  ADCx)

Get ADC resolution.

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

Reference Manual to LL API cross reference:
CFGR RES LL_ADC_GetResolution
Parameters:
ADCxADC instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 3044 of file stm32h7xx_ll_adc.h.

References LL_ADC_RESOLUTION_8B.

__STATIC_INLINE void LL_ADC_SetCalibrationLinearFactor ( ADC_TypeDef *  ADCx,
uint32_t  LinearityWord,
uint32_t  CalibrationFactor 
)

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

Note:
This function is intended to set linear calibration parameters without having to perform a new calibration using LL_ADC_StartCalibration().
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.
Reference Manual to LL API cross reference:
CALFACT2 LINCALFACT LL_ADC_SetCalibrationLinearFactor
CALFACT2 LINCALFACT LL_ADC_SetCalibrationLinearFactor
Parameters:
ADCxADC instance
LinearityWordThis parameter can be one of the following values:
CalibrationFactorValue between Min_Data=0x00 and Max_Data=0x3FFFFFFF
Return values:
None

Definition at line 2909 of file stm32h7xx_ll_adc.h.

References ADC_LINEARITY_BIT_TOGGLE_TIMEOUT.

Referenced by HAL_ADCEx_LinearCalibration_SetValue().

__STATIC_INLINE void LL_ADC_SetCalibrationOffsetFactor ( ADC_TypeDef *  ADCx,
uint32_t  SingleDiff,
uint32_t  CalibrationFactor 
)

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().
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).
In case of setting calibration factors of both modes single ended and differential (parameter LL_ADC_BOTH_SINGLE_DIFF_ENDED): both calibration factors must be concatenated. To perform this processing, use helper macro __LL_ADC_CALIB_FACTOR_SINGLE_DIFF().
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.
Reference Manual to LL API cross reference:
CALFACT CALFACT_S LL_ADC_SetCalibrationOffsetFactor
CALFACT CALFACT_D LL_ADC_SetCalibrationOffsetFactor
Parameters:
ADCxADC instance
SingleDiffThis parameter can be one of the following values:
CalibrationFactorValue between Min_Data=0x00 and Max_Data=0x7F
Return values:
None

Definition at line 2843 of file stm32h7xx_ll_adc.h.

References ADC_SINGLEDIFF_CALIB_F_BIT_D_MASK, ADC_SINGLEDIFF_CALIB_F_BIT_D_SHIFT4, and ADC_SINGLEDIFF_CALIB_FACTOR_MASK.

Referenced by HAL_ADCEx_Calibration_SetValue().

__STATIC_INLINE void LL_ADC_SetChannelPreSelection ( ADC_TypeDef *  ADCx,
uint32_t  Channel 
)

Set ADC selected Channel.

Note:
This function set the pre-selection of channel configuration.
Caution: Channel selections is dependent to ADC instance and IP version: For STM32H72x/3x This is applicable only for ADC1/ADC2 For Rest of STM32H7xxx This is applicable only all the ADCs instances.
Parameters:
ADCxADC instance
ChannelThis parameter can be one of the following values:
Return values:
None

Definition at line 3225 of file stm32h7xx_ll_adc.h.

References __LL_ADC_CHANNEL_TO_DECIMAL_NB.

__STATIC_INLINE void LL_ADC_SetDataRightShift ( ADC_TypeDef *  ADCx,
uint32_t  Offsety,
uint32_t  RigthShift 
)

Set data right shift 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:
CFGR2 RSHIFT LL_ADC_SetDataRightShift
Parameters:
ADCxADC instance
OffsetyThis parameter can be one of the following values:
RigthShiftThis parameter can be one of the following values:
Return values:
ReturnedNone

Definition at line 3443 of file stm32h7xx_ll_adc.h.

Referenced by HAL_ADC_ConfigChannel().

__STATIC_INLINE void LL_ADC_SetLowPowerMode ( ADC_TypeDef *  ADCx,
uint32_t  LowPowerMode 
)

Set ADC low power mode.

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, 2. 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".
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 may be outdated: does not correspond to the current voltage level on the selected ADC channel.
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.
Reference Manual to LL API cross reference:
CFGR AUTDLY LL_ADC_SetLowPowerMode
Parameters:
ADCxADC instance
LowPowerModeThis parameter can be one of the following values:
Return values:
None

Definition at line 3138 of file stm32h7xx_ll_adc.h.

__STATIC_INLINE void LL_ADC_SetOffset ( ADC_TypeDef *  ADCx,
uint32_t  Offsety,
uint32_t  Channel,
uint32_t  OffsetLevel 
)

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

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 subtracted from the raw converted data).
Caution: Offset format is dependent to ADC resolution: offset has to be left-aligned on bit 11, the LSB (right bits) are set to 0.
This function enables the offset, by default. It can be forced to disable state using function LL_ADC_SetOffsetState().
If a channel is mapped on several offsets numbers, only the offset with the lowest value is considered for the subtraction.
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.
On STM32H7, some fast channels are available: fast analog inputs coming from GPIO pads (ADC_IN0..5).
Reference Manual to LL API cross reference:
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
Parameters:
ADCxADC instance
OffsetyThis parameter can be one of the following values:
ChannelThis parameter can be one of the following values: (1) On STM32H7, parameter available only on ADC instance: ADC3.
(2) On STM32H7, parameter available only on ADC instance: ADC2.
(3) On STM32H7, fast channel (0.125 us for 14-bit resolution (ADC conversion rate up to 8 Ms/s)). Other channels are slow channels (conversion rate: refer to reference manual).
OffsetLevelValue between Min_Data=0x000 and Max_Data=0x1FFFFFF
Return values:
None

Definition at line 3312 of file stm32h7xx_ll_adc.h.

References __ADC_PTR_REG_OFFSET, and ADC_CHANNEL_ID_NUMBER_MASK.

Referenced by HAL_ADC_ConfigChannel(), and HAL_ADCEx_InjectedConfigChannel().

__STATIC_INLINE void LL_ADC_SetOffsetSaturation ( ADC_TypeDef *  ADCx,
uint32_t  Offsety,
uint32_t  OffsetSaturation 
)

Set for the ADC selected offset number 1, 2, 3 or 4: choose offset saturation 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.
Reference Manual to LL API cross reference:
OFR1 SATEN LL_ADC_SetOffsetSaturation
OFR2 SATEN LL_ADC_SetOffsetSaturation
OFR3 SATEN LL_ADC_SetOffsetSaturation
OFR4 SATEN LL_ADC_SetOffsetSaturation
Parameters:
ADCxADC instance
OffsetyThis parameter can be one of the following values:
OffsetSaturationThis parameter can be one of the following values:
Return values:
None

Definition at line 3556 of file stm32h7xx_ll_adc.h.

References __ADC_PTR_REG_OFFSET.

Referenced by HAL_ADC_ConfigChannel(), and HAL_ADCEx_InjectedConfigChannel().

__STATIC_INLINE void LL_ADC_SetOffsetSign ( ADC_TypeDef *  ADCx,
uint32_t  Offsety,
uint32_t  OffsetSign 
)

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

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.
Reference Manual to LL API cross reference:
OFR1 OFFSETPOS LL_ADC_SetOffsetSign
OFR2 OFFSETPOS LL_ADC_SetOffsetSign
OFR3 OFFSETPOS LL_ADC_SetOffsetSign
OFR4 OFFSETPOS LL_ADC_SetOffsetSign
Parameters:
ADCxADC instance
OffsetyThis parameter can be one of the following values:
OffsetSignThis parameter can be one of the following values:
Return values:
None

Definition at line 3620 of file stm32h7xx_ll_adc.h.

References __ADC_PTR_REG_OFFSET.

Referenced by HAL_ADC_ConfigChannel(), and HAL_ADCEx_InjectedConfigChannel().

__STATIC_INLINE void LL_ADC_SetOffsetSignedSaturation ( ADC_TypeDef *  ADCx,
uint32_t  Offsety,
uint32_t  OffsetSignedSaturation 
)

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:
OFR1 SSATE LL_ADC_SetOffsetSignedSaturation
OFR2 SSATE LL_ADC_SetOffsetSignedSaturation
OFR3 SSATE LL_ADC_SetOffsetSignedSaturation
OFR4 SSATE LL_ADC_SetOffsetSignedSaturation
Parameters:
ADCxADC instance
OffsetyThis parameter can be one of the following values:
OffsetSignedSaturationThis parameter can be one of the following values:
Return values:
ReturnedNone

Definition at line 3485 of file stm32h7xx_ll_adc.h.

References __ADC_PTR_REG_OFFSET.

Referenced by HAL_ADC_ConfigChannel(), and HAL_ADCEx_InjectedConfigChannel().

__STATIC_INLINE void LL_ADC_SetOffsetState ( ADC_TypeDef *  ADCx,
uint32_t  Offsety,
uint32_t  OffsetState 
)

Set for the ADC selected offset number 1, 2, 3 or 4: force offset state disable or enable without modifying offset channel or offset value.

Note:
This function should be needed only in case of offset to be enabled-disabled dynamically, and should not be needed in other cases: function LL_ADC_SetOffset() automatically enables the offset.
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.
Reference Manual to LL API cross reference:
OFR1 OFFSET1_EN LL_ADC_SetOffsetState
OFR2 OFFSET2_EN LL_ADC_SetOffsetState
OFR3 OFFSET3_EN LL_ADC_SetOffsetState
OFR4 OFFSET4_EN LL_ADC_SetOffsetState
Parameters:
ADCxADC instance
OffsetyThis parameter can be one of the following values:
OffsetStateThis parameter can be one of the following values:
Return values:
None

Definition at line 3689 of file stm32h7xx_ll_adc.h.

References __ADC_PTR_REG_OFFSET.

Referenced by HAL_ADC_ConfigChannel(), and HAL_ADCEx_InjectedConfigChannel().

__STATIC_INLINE void LL_ADC_SetResolution ( ADC_TypeDef *  ADCx,
uint32_t  Resolution 
)

Set ADC resolution.

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 either groups regular or injected.
Reference Manual to LL API cross reference:
CFGR RES LL_ADC_SetResolution
Parameters:
ADCxADC instance
ResolutionThis parameter can be one of the following values:
Return values:
None

Definition at line 2981 of file stm32h7xx_ll_adc.h.

References __LL_ADC12_RESOLUTION_TO_ADC3, and LL_ADC_RESOLUTION_8B.