STM8L15x Standard Peripherals Drivers: PVD configuration functions

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

PVD configuration functions

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.

Parameters:
None
Return values:
None

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).

Parameters:
NewState,:new state of the PVD. This parameter can be: ENABLE or DISABLE.
Return values:
None

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).

Parameters:
PWR_PVDLevel,:specifies the PVD detection level This parameter can be one of the following values:
  • PWR_PVDLevel_1V85: PVD detection level set to 1.85V
  • PWR_PVDLevel_2V05: PVD detection level set to 2.05V
  • PWR_PVDLevel_2V26: PVD detection level set to 2.26V
  • PWR_PVDLevel_2V45: PVD detection level set to 2.45V
  • PWR_PVDLevel_2V65: PVD detection level set to 2.65V
  • PWR_PVDLevel_2V85: PVD detection level set to 2.85V
  • PWR_PVDLevel_3V05: PVD detection level set to 3.05V
  • PWR_PVDLevel_PVDIn: External input analog voltage (Compare internally to VREFINT)
Return values:
None

Definition at line 96 of file stm8l15x_pwr.c.

References IS_PWR_PVD_LEVEL, PWR, and PWR_CSR1_PLS.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com