STM8L15x Standard Peripherals Drivers
|
PVD configuration functions. More...
Functions | |
void | PWR_DeInit (void) |
Deinitializes the PWR peripheral registers to their default reset values. | |
void | PWR_PVDCmd (FunctionalState NewState) |
Enables or disables the Power Voltage Detector(PVD). | |
void | PWR_PVDLevelConfig (PWR_PVDLevel_TypeDef PWR_PVDLevel) |
Configures the voltage threshold detected by the Power Voltage Detector(PVD). |
Detailed Description
PVD configuration functions.
=============================================================================== PVD configuration functions =============================================================================== - The PVD is used to monitor the VDD power supply by comparing it to a threshold selected by the PVD Level (PLS[2:0] bits in the PWR_CSR1). - The PVD can use an external input analog voltage (PVD_IN) which is compared internally to VREFINT. The PVD_IN (PE6) has to be configured in Analog mode when PWR_PVDLevel_PVDIn is selected (PLS[2:0] = 111). - A PVDO flag is available to indicate if VDD/VDDA is higher or lower than the PVD threshold. An interrupt is generated in case enabled for PVD. - The PVD interrup event has the capability to wake up the CPU from Halt/Active Halt modes.
Function Documentation
void PWR_DeInit | ( | void | ) |
Deinitializes the PWR peripheral registers to their default reset values.
Definition at line 76 of file stm8l15x_pwr.c.
References PWR, PWR_CSR1_PVDIF, and PWR_CSR2_RESET_VALUE.
void PWR_PVDCmd | ( | FunctionalState | NewState | ) |
Enables or disables the Power Voltage Detector(PVD).
Definition at line 115 of file stm8l15x_pwr.c.
References DISABLE, IS_FUNCTIONAL_STATE, PWR, and PWR_CSR1_PVDE.
void PWR_PVDLevelConfig | ( | PWR_PVDLevel_TypeDef | PWR_PVDLevel | ) |
Configures the voltage threshold detected by the Power Voltage Detector(PVD).
Definition at line 96 of file stm8l15x_pwr.c.
References IS_PWR_PVD_LEVEL, PWR, and PWR_CSR1_PLS.