STM32F0 Standard Peripheral bibliotheek  1.0
ST Microelectronics standard peripheral bibliotheek documentatie voor de STM32F0 familie
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
Analog Watchdog configuration functions

Analog Watchdog configuration functions. More...

Functions

void ADC_AnalogWatchdogCmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the analog watchdog. More...
 
void ADC_AnalogWatchdogThresholdsConfig (ADC_TypeDef *ADCx, uint16_t HighThreshold, uint16_t LowThreshold)
 Configures the high and low thresholds of the analog watchdog. More...
 
void ADC_AnalogWatchdogSingleChannelConfig (ADC_TypeDef *ADCx, uint32_t ADC_AnalogWatchdog_Channel)
 Configures the analog watchdog guarded single channel. More...
 
void ADC_AnalogWatchdogSingleChannelCmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the ADC Analog Watchdog Single Channel. More...
 

Detailed Description

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.
         (#) Enable the analog watchdog on the selected channel using
             ADC_AnalogWatchdogSingleChannelCmd() function

Function Documentation

void ADC_AnalogWatchdogCmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Enables or disables the analog watchdog.

Parameters
ADCx,:where x can be 1 to select the ADC1 peripheral.
NewState,:new state of the ADCx Analog Watchdog. This parameter can be: ENABLE or DISABLE.
Return values
None
void ADC_AnalogWatchdogSingleChannelCmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Enables or disables the ADC Analog Watchdog Single Channel.

Parameters
ADCx,:where x can be 1 to select the ADC1 peripheral.
NewState,:new state of the ADCx ADC Analog Watchdog Single Channel. This parameter can be: ENABLE or DISABLE.
Return values
None
void ADC_AnalogWatchdogSingleChannelConfig ( ADC_TypeDef *  ADCx,
uint32_t  ADC_AnalogWatchdog_Channel 
)

Configures the analog watchdog guarded single channel.

Parameters
ADCx,:where x can be 1 to select the ADC1 peripheral.
ADC_AnalogWatchdog_Channel,:the ADC channel to configure for the analog watchdog. This parameter can be one of the following values:
  • ADC_AnalogWatchdog_Channel_0: ADC Channel0 selected
  • ADC_AnalogWatchdog_Channel_1: ADC Channel1 selected
  • ADC_AnalogWatchdog_Channel_2: ADC Channel2 selected
  • ADC_AnalogWatchdog_Channel_3: ADC Channel3 selected
  • ADC_AnalogWatchdog_Channel_4: ADC Channel4 selected
  • ADC_AnalogWatchdog_Channel_5: ADC Channel5 selected
  • ADC_AnalogWatchdog_Channel_6: ADC Channel6 selected
  • ADC_AnalogWatchdog_Channel_7: ADC Channel7 selected
  • ADC_AnalogWatchdog_Channel_8: ADC Channel8 selected
  • ADC_AnalogWatchdog_Channel_9: ADC Channel9 selected
  • ADC_AnalogWatchdog_Channel_10: ADC Channel10 selected
  • ADC_AnalogWatchdog_Channel_11: ADC Channel11 selected
  • ADC_AnalogWatchdog_Channel_12: ADC Channel12 selected
  • ADC_AnalogWatchdog_Channel_13: ADC Channel13 selected
  • ADC_AnalogWatchdog_Channel_14: ADC Channel14 selected
  • ADC_AnalogWatchdog_Channel_15: ADC Channel15 selected
  • ADC_AnalogWatchdog_Channel_16: ADC Channel16 selected
  • ADC_AnalogWatchdog_Channel_17: ADC Channel17 selected
  • ADC_AnalogWatchdog_Channel_18: ADC Channel18 selected
Note
The channel selected on the AWDCH must be also set into the CHSELR register
Return values
None
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 to select the ADC1 peripheral.
HighThreshold,:the ADC analog watchdog High threshold value. This parameter must be a 12bit value.
LowThreshold,:the ADC analog watchdog Low threshold value. This parameter must be a 12bit value.
Return values
None