PWR_Private_Functions
[PWR]

Functions

void PWR_BackupAccessCmd (FunctionalState NewState)
 Enables or disables access to the RTC and backup registers.
void PWR_ClearFlag (uint32_t PWR_FLAG)
 Clears the PWR's pending flags.
void PWR_DeInit (void)
 Deinitializes the PWR peripheral registers to their default reset values.
void PWR_EnterSTANDBYMode (void)
 Enters STANDBY mode.
void PWR_EnterSTOPMode (uint32_t PWR_Regulator, uint8_t PWR_STOPEntry)
 Enters STOP mode.
FlagStatus PWR_GetFlagStatus (uint32_t PWR_FLAG)
 Checks whether the specified PWR flag is set or not.
void PWR_PVDCmd (FunctionalState NewState)
 Enables or disables the Power Voltage Detector(PVD).
void PWR_PVDLevelConfig (uint32_t PWR_PVDLevel)
 Configures the voltage threshold detected by the Power Voltage Detector(PVD).
void PWR_WakeUpPinCmd (FunctionalState NewState)
 Enables or disables the WakeUp Pin functionality.

Function Documentation

void PWR_BackupAccessCmd ( FunctionalState  NewState  ) 

Enables or disables access to the RTC and backup registers.

Parameters:
NewState,: new state of the access to the RTC and backup registers. This parameter can be: ENABLE or DISABLE.
Return values:
None 

Definition at line 123 of file stm32f10x_pwr.c.

References assert_param, CR_DBP_BB, and IS_FUNCTIONAL_STATE.

Referenced by main(), and RTC_Configuration().

void PWR_ClearFlag ( uint32_t  PWR_FLAG  ) 

Clears the PWR's pending flags.

Parameters:
PWR_FLAG,: specifies the flag to clear. This parameter can be one of the following values:

  • PWR_FLAG_WU: Wake Up flag
  • PWR_FLAG_SB: StandBy flag
Return values:
None 

Definition at line 286 of file stm32f10x_pwr.c.

References assert_param, IS_PWR_CLEAR_FLAG, and PWR.

Referenced by RTC_Configuration(), and RTCAlarm_IRQHandler().

void PWR_DeInit ( void   ) 

Deinitializes the PWR peripheral registers to their default reset values.

Parameters:
None 
Return values:
None 

Definition at line 111 of file stm32f10x_pwr.c.

References DISABLE, ENABLE, RCC_APB1Periph_PWR, and RCC_APB1PeriphResetCmd().

void PWR_EnterSTANDBYMode ( void   ) 

Enters STANDBY mode.

Parameters:
None 
Return values:
None 

Definition at line 235 of file stm32f10x_pwr.c.

References PWR, PWR_CR_CWUF, PWR_CR_PDDS, and SCB_SCR_SLEEPDEEP.

Referenced by EXTI9_5_IRQHandler().

void PWR_EnterSTOPMode ( uint32_t  PWR_Regulator,
uint8_t  PWR_STOPEntry 
)

Enters STOP mode.

Parameters:
PWR_Regulator,: specifies the regulator state in STOP mode. This parameter can be one of the following values:

  • PWR_Regulator_ON: STOP mode with regulator ON
  • PWR_Regulator_LowPower: STOP mode with regulator in low power mode
PWR_STOPEntry,: specifies if STOP mode in entered with WFI or WFE instruction. This parameter can be one of the following values:

  • PWR_STOPEntry_WFI: enter STOP mode with WFI instruction
  • PWR_STOPEntry_WFE: enter STOP mode with WFE instruction
Return values:
None 

Definition at line 196 of file stm32f10x_pwr.c.

References assert_param, CR_DS_MASK, IS_PWR_REGULATOR, IS_PWR_STOP_ENTRY, PWR, PWR_STOPEntry_WFI, and SCB_SCR_SLEEPDEEP.

Referenced by HDMI_CEC_CommandCallBack(), and main().

FlagStatus PWR_GetFlagStatus ( uint32_t  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_WU: Wake Up flag
  • PWR_FLAG_SB: StandBy flag
  • PWR_FLAG_PVDO: PVD Output
Return values:
The new state of PWR_FLAG (SET or RESET).

Definition at line 260 of file stm32f10x_pwr.c.

References assert_param, IS_PWR_GET_FLAG, PWR, RESET, and SET.

Referenced by RTC_Configuration(), and RTCAlarm_IRQHandler().

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 136 of file stm32f10x_pwr.c.

References assert_param, CR_PVDE_BB, and IS_FUNCTIONAL_STATE.

Referenced by main().

void PWR_PVDLevelConfig ( uint32_t  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_2V2: PVD detection level set to 2.2V
  • PWR_PVDLevel_2V3: PVD detection level set to 2.3V
  • PWR_PVDLevel_2V4: PVD detection level set to 2.4V
  • PWR_PVDLevel_2V5: PVD detection level set to 2.5V
  • PWR_PVDLevel_2V6: PVD detection level set to 2.6V
  • PWR_PVDLevel_2V7: PVD detection level set to 2.7V
  • PWR_PVDLevel_2V8: PVD detection level set to 2.8V
  • PWR_PVDLevel_2V9: PVD detection level set to 2.9V
Return values:
None 

Definition at line 157 of file stm32f10x_pwr.c.

References assert_param, CR_PLS_MASK, IS_PWR_PVD_LEVEL, and PWR.

Referenced by main().

void PWR_WakeUpPinCmd ( FunctionalState  NewState  ) 

Enables or disables the WakeUp Pin functionality.

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

Definition at line 177 of file stm32f10x_pwr.c.

References assert_param, CSR_EWUP_BB, and IS_FUNCTIONAL_STATE.

Referenced by main().

STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32