STM32F439xx HAL User Manual
Functions
Configuration of ADC transversal scope: analog watchdog
ADC Exported Functions

Functions

__STATIC_INLINE void LL_ADC_SetAnalogWDMonitChannels (ADC_TypeDef *ADCx, uint32_t AWDChannelGroup)
 Set ADC analog watchdog monitored channels: a single channel or all channels, on ADC groups regular and-or injected.
__STATIC_INLINE uint32_t LL_ADC_GetAnalogWDMonitChannels (ADC_TypeDef *ADCx)
 Get ADC analog watchdog monitored channel.
__STATIC_INLINE void LL_ADC_SetAnalogWDThresholds (ADC_TypeDef *ADCx, uint32_t AWDThresholdsHighLow, uint32_t AWDThresholdValue)
 Set ADC analog watchdog threshold value of threshold high or low.
__STATIC_INLINE uint32_t LL_ADC_GetAnalogWDThresholds (ADC_TypeDef *ADCx, uint32_t AWDThresholdsHighLow)
 Get ADC analog watchdog threshold value of threshold high or threshold low.

Function Documentation

__STATIC_INLINE uint32_t LL_ADC_GetAnalogWDMonitChannels ( ADC_TypeDef *  ADCx)

Get ADC analog watchdog monitored channel.

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(). Applicable only when the analog watchdog is set to monitor one channel.
On this STM32 serie, there is only 1 kind 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.
    • resolution: resolution is not limited (corresponds to ADC resolution configured).
Reference Manual to LL API cross reference:
CR1 AWD1CH LL_ADC_GetAnalogWDMonitChannels
CR1 AWD1SGL LL_ADC_GetAnalogWDMonitChannels
CR1 AWD1EN LL_ADC_GetAnalogWDMonitChannels
Parameters:
ADCxADC instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 3473 of file stm32f4xx_ll_adc.h.

__STATIC_INLINE uint32_t LL_ADC_GetAnalogWDThresholds ( ADC_TypeDef *  ADCx,
uint32_t  AWDThresholdsHighLow 
)

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

Note:
In case of ADC resolution different of 12 bits, analog watchdog thresholds data require a specific shift. Use helper macro __LL_ADC_ANALOGWD_GET_THRESHOLD_RESOLUTION().
Reference Manual to LL API cross reference:
HTR HT LL_ADC_GetAnalogWDThresholds
LTR LT LL_ADC_GetAnalogWDThresholds
Parameters:
ADCxADC instance
AWDThresholdsHighLowThis parameter can be one of the following values:
Return values:
Valuebetween Min_Data=0x000 and Max_Data=0xFFF

Definition at line 3523 of file stm32f4xx_ll_adc.h.

References __ADC_PTR_REG_OFFSET.

__STATIC_INLINE void LL_ADC_SetAnalogWDMonitChannels ( ADC_TypeDef *  ADCx,
uint32_t  AWDChannelGroup 
)

Set ADC analog watchdog monitored channels: a single channel or all channels, on ADC groups regular and-or injected.

Note:
Once monitored channels are selected, analog watchdog is enabled.
In case of need to define a single channel to monitor with analog watchdog from sequencer channel definition, use helper macro __LL_ADC_ANALOGWD_CHANNEL_GROUP().
On this STM32 serie, there is only 1 kind 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.
    • resolution: resolution is not limited (corresponds to ADC resolution configured).
Reference Manual to LL API cross reference:
CR1 AWD1CH LL_ADC_SetAnalogWDMonitChannels
CR1 AWD1SGL LL_ADC_SetAnalogWDMonitChannels
CR1 AWD1EN LL_ADC_SetAnalogWDMonitChannels
Parameters:
ADCxADC instance
AWDChannelGroupThis parameter can be one of the following values: (1) On STM32F4, parameter available only on ADC instance: ADC1.
(2) On devices STM32F42x and STM32F43x, limitation: this internal channel is shared between temperature sensor and Vbat, only 1 measurement path must be enabled.
Return values:
None

Definition at line 3377 of file stm32f4xx_ll_adc.h.

__STATIC_INLINE void LL_ADC_SetAnalogWDThresholds ( ADC_TypeDef *  ADCx,
uint32_t  AWDThresholdsHighLow,
uint32_t  AWDThresholdValue 
)

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

Note:
In case of ADC resolution different of 12 bits, analog watchdog thresholds data require a specific shift. Use helper macro __LL_ADC_ANALOGWD_SET_THRESHOLD_RESOLUTION().
On this STM32 serie, there is only 1 kind 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.
    • resolution: resolution is not limited (corresponds to ADC resolution configured).
Reference Manual to LL API cross reference:
HTR HT LL_ADC_SetAnalogWDThresholds
LTR LT LL_ADC_SetAnalogWDThresholds
Parameters:
ADCxADC instance
AWDThresholdsHighLowThis parameter can be one of the following values:
AWDThresholdValueValue between Min_Data=0x000 and Max_Data=0xFFF
Return values:
None

Definition at line 3500 of file stm32f4xx_ll_adc.h.

References __ADC_PTR_REG_OFFSET.