|
STM8L15x Standard Peripherals Drivers
|
Analog Watchdog configuration functions. More...
Functions | |
| void | ADC_AnalogWatchdogChannelSelect (ADC_TypeDef *ADCx, ADC_AnalogWatchdogSelection_TypeDef ADC_AnalogWatchdogSelection) |
| Configures the channel to be checked by the Analog watchdog. | |
| void | ADC_AnalogWatchdogConfig (ADC_TypeDef *ADCx, ADC_AnalogWatchdogSelection_TypeDef ADC_AnalogWatchdogSelection, uint16_t HighThreshold, uint16_t LowThreshold) |
| Configures the Analog watchdog. | |
| void | ADC_AnalogWatchdogThresholdsConfig (ADC_TypeDef *ADCx, uint16_t HighThreshold, uint16_t LowThreshold) |
| Configures the high and low thresholds of the Analog watchdog. | |
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 :
1. the ADC guarded channel is selected using the
ADC_AnalogWatchdogChannelSelect() function.
2. The Analog watchdog lower and higher threshold are configured using the
ADC_AnalogWatchdogThresholdsConfig() function.
Note : Both AWD selection and thresholds can be configured with one unique
function ADC_AnalogWatchdogConfig(), which is kept for firmware
compatibility reason.
Function Documentation
| void ADC_AnalogWatchdogChannelSelect | ( | ADC_TypeDef * | ADCx, |
| ADC_AnalogWatchdogSelection_TypeDef | ADC_AnalogWatchdogSelection | ||
| ) |
Configures the channel to be checked by the Analog watchdog.
Definition at line 333 of file stm8l15x_adc.c.
References ADC_CR3_CHSEL, ADC_struct::CR3, and IS_ADC_ANALOGWATCHDOG_SELECTION.
| void ADC_AnalogWatchdogConfig | ( | ADC_TypeDef * | ADCx, |
| ADC_AnalogWatchdogSelection_TypeDef | ADC_AnalogWatchdogSelection, | ||
| uint16_t | HighThreshold, | ||
| uint16_t | LowThreshold | ||
| ) |
Configures the Analog watchdog.
Definition at line 406 of file stm8l15x_adc.c.
References ADC_CR3_CHSEL, ADC_struct::CR3, ADC_struct::HTRH, ADC_struct::HTRL, IS_ADC_ANALOGWATCHDOG_SELECTION, IS_ADC_THRESHOLD, ADC_struct::LTRH, and ADC_struct::LTRL.
| void ADC_AnalogWatchdogThresholdsConfig | ( | ADC_TypeDef * | ADCx, |
| uint16_t | HighThreshold, | ||
| uint16_t | LowThreshold | ||
| ) |
Configures the high and low thresholds of the Analog watchdog.
Definition at line 355 of file stm8l15x_adc.c.
References ADC_struct::HTRH, ADC_struct::HTRL, IS_ADC_THRESHOLD, ADC_struct::LTRH, and ADC_struct::LTRL.