Analog Watchdog configuration functions.
More...
Analog Watchdog configuration functions.
===============================================================================
##### Analog Watchdog configuration functions #####
===============================================================================
[..] This section provides functions allowing to configure the Analog Watchdog
(AWD) feature in the ADC.
[..] A typical configuration Analog Watchdog is done following these steps :
(#) the ADC guarded channel(s) is (are) selected using the
ADC_AnalogWatchdogSingleChannelConfig() function.
(#) The Analog watchdog lower and higher threshold are configured using the
ADC_AnalogWatchdogThresholdsConfig() function.
(#) The Analog watchdog is enabled and configured to enable the check, on one
or more channels, using the ADC_AnalogWatchdogCmd() function.
void ADC_AnalogWatchdogCmd |
( |
ADC_TypeDef * |
ADCx, |
|
|
uint32_t |
ADC_AnalogWatchdog |
|
) |
| |
Enables or disables the analog watchdog on single/all regular or injected channels.
- Parameters
-
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
ADC_AnalogWatchdog | the ADC analog watchdog configuration. This parameter can be one of the following values:
- ADC_AnalogWatchdog_SingleRegEnable: Analog watchdog on a single regular channel
- ADC_AnalogWatchdog_SingleInjecEnable: Analog watchdog on a single injected channel
- ADC_AnalogWatchdog_SingleRegOrInjecEnable: Analog watchdog on a single regular or injected channel
- ADC_AnalogWatchdog_AllRegEnable: Analog watchdog on all regular channel
- ADC_AnalogWatchdog_AllInjecEnable: Analog watchdog on all injected channel
- ADC_AnalogWatchdog_AllRegAllInjecEnable: Analog watchdog on all regular and injected channels
- ADC_AnalogWatchdog_None: No channel guarded by the analog watchdog
|
- Return values
-
Definition at line 455 of file stm32f4xx_adc.c.
void ADC_AnalogWatchdogSingleChannelConfig |
( |
ADC_TypeDef * |
ADCx, |
|
|
uint8_t |
ADC_Channel |
|
) |
| |
Configures the analog watchdog guarded single channel.
- Parameters
-
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
ADC_Channel | the ADC channel to configure for the analog watchdog. This parameter can be one of the following values:
- ADC_Channel_0: ADC Channel0 selected
- ADC_Channel_1: ADC Channel1 selected
- ADC_Channel_2: ADC Channel2 selected
- ADC_Channel_3: ADC Channel3 selected
- ADC_Channel_4: ADC Channel4 selected
- ADC_Channel_5: ADC Channel5 selected
- ADC_Channel_6: ADC Channel6 selected
- ADC_Channel_7: ADC Channel7 selected
- ADC_Channel_8: ADC Channel8 selected
- ADC_Channel_9: ADC Channel9 selected
- ADC_Channel_10: ADC Channel10 selected
- ADC_Channel_11: ADC Channel11 selected
- ADC_Channel_12: ADC Channel12 selected
- ADC_Channel_13: ADC Channel13 selected
- ADC_Channel_14: ADC Channel14 selected
- ADC_Channel_15: ADC Channel15 selected
- ADC_Channel_16: ADC Channel16 selected
- ADC_Channel_17: ADC Channel17 selected
- ADC_Channel_18: ADC Channel18 selected
|
- Return values
-
Definition at line 525 of file stm32f4xx_adc.c.
void ADC_AnalogWatchdogThresholdsConfig |
( |
ADC_TypeDef * |
ADCx, |
|
|
uint16_t |
HighThreshold, |
|
|
uint16_t |
LowThreshold |
|
) |
| |
Configures the high and low thresholds of the analog watchdog.
- Parameters
-
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
HighThreshold | the ADC analog watchdog High threshold value. This parameter must be a 12-bit value. |
LowThreshold | the ADC analog watchdog Low threshold value. This parameter must be a 12-bit value. |
- Return values
-
Definition at line 484 of file stm32f4xx_adc.c.