STM8L15x Standard Peripherals Drivers: PWR

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

PWR driver modules. More...

Modules

 PWR_Exported_Types
 PWR_Private_Functions

Functions

void PWR_DeInit (void)
 Deinitializes the PWR peripheral registers to their default reset values.
void PWR_FastWakeUpCmd (FunctionalState NewState)
 Enables or disables the Fast WakeUp from Ultra Low Power mode.
FlagStatus PWR_GetFlagStatus (PWR_FLAG_TypeDef PWR_FLAG)
 Checks whether the specified PWR flag is set or not.
void PWR_PVDClearFlag (void)
 Clears the PWR PVDIF Flag.
void PWR_PVDClearITPendingBit (void)
 Clears the PWR interrupt pending bit.
void PWR_PVDCmd (FunctionalState NewState)
 Enables or disables the Power Voltage Detector(PVD).
ITStatus PWR_PVDGetITStatus (void)
 Checks whether the PVD interrupt has occurred or not.
void PWR_PVDITConfig (FunctionalState NewState)
 Configures the Programmable Voltage Detector (PVD) Interrupt .
void PWR_PVDLevelConfig (PWR_PVDLevel_TypeDef PWR_PVDLevel)
 Configures the voltage threshold detected by the Power Voltage Detector(PVD).
void PWR_UltraLowPowerCmd (FunctionalState NewState)
 Enables or disables the Ultra Low Power mode.

Detailed Description

PWR driver modules.


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_FastWakeUpCmd ( FunctionalState  NewState)

Enables or disables the Fast WakeUp from Ultra Low Power mode.

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

Definition at line 165 of file stm8l15x_pwr.c.

References DISABLE, IS_FUNCTIONAL_STATE, PWR, and PWR_CSR2_FWU.

FlagStatus PWR_GetFlagStatus ( PWR_FLAG_TypeDef  PWR_FLAG)

Checks whether the specified PWR flag is set or not.

Parameters:
PWR_FLAG,:specifies the flag to check. This parameter can be one of the following values:
  • PWR_FLAG_PVDOF: PVD Output. This flag is valid only if PVD is enabled by the PWR_PVDCmd() function.
  • PWR_FLAG_VREFINTF: Internal Voltage Reference Ready flag. This flag indicates the state of the internal voltage reference, VREFINT.
  • PWR_FLAG_PVDIF: PVD Interrupt Flag, it's set by hardware when a PVD event occurs
Return values:
Thenew state of PWR_FLAG (SET or RESET).

Definition at line 255 of file stm8l15x_pwr.c.

References IS_PWR_FLAG, PWR, PWR_CR2_VREFINTF, PWR_FLAG_VREFINTF, RESET, and SET.

void PWR_PVDClearFlag ( void  )

Clears the PWR PVDIF Flag.

Parameters:
None
Return values:
None

Definition at line 294 of file stm8l15x_pwr.c.

References PWR, and PWR_CSR1_PVDIF.

void PWR_PVDClearITPendingBit ( void  )

Clears the PWR interrupt pending bit.

Parameters:
None
Return values:
None

Definition at line 330 of file stm8l15x_pwr.c.

References PWR, and PWR_CSR1_PVDIF.

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.

ITStatus PWR_PVDGetITStatus ( void  )

Checks whether the PVD interrupt has occurred or not.

Parameters:
None
Return values:
Thenew state of the PVD Interrupt (SET or RESET).

Definition at line 305 of file stm8l15x_pwr.c.

References PWR, PWR_CSR1_PVDIEN, PWR_CSR1_PVDIF, RESET, and SET.

void PWR_PVDITConfig ( FunctionalState  NewState)

Configures the Programmable Voltage Detector (PVD) Interrupt .

Parameters:
NewState: Indicates the new state of the PVD interrupt.
Return values:
None

Definition at line 226 of file stm8l15x_pwr.c.

References DISABLE, IS_FUNCTIONAL_STATE, PWR, and PWR_CSR1_PVDIEN.

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.

void PWR_UltraLowPowerCmd ( FunctionalState  NewState)

Enables or disables the Ultra Low Power mode.

Parameters:
NewState,:new state of the Ultra Low Power mode. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 188 of file stm8l15x_pwr.c.

References DISABLE, IS_FUNCTIONAL_STATE, PWR, and PWR_CSR2_ULP.

STM8S Firmware Library: Overview

 

 

 

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