WB32F10x Standard Peripherals Firmware Library

模块 | 宏定义 | 函数
PWR
WB32F10x_StdPeriph_Driver

PWR driver modules 更多...

## 模块
| PWR_Exported_Constants
| PWR_Private_Defines
| PWR_Private_Functions

## 宏定义
#define | PRE_LP() ((void(*)(void))((unsigned int)(pre_lp_code) | 0x01))()
#define | POST_LP() ((void(*)(void))((unsigned int)(post_lp_code) | 0x01))()

## 函数
void | PWR_BackupAccessCmd (FunctionalState NewState)
| Enables or disables access to the RTC and backup registers. 更多...
void | PWR_WakeUpPinCmd (FunctionalState NewState)
| Enables or disables the WakeUp Pin functionality. 更多...
void | PWR_EnterSLEEPMode (uint8_t PWR_FCLK, uint8_t PWR_EntryMode)
| Enters SLEEP mode. 更多...
void | PWR_EnterSTOPMode (uint16_t PWR_STOPMode, uint8_t PWR_EntryMode)
| Enters STOP mode. 更多...
void | PWR_EnterSTANDBYMode (void)
| Enters STANDBY mode. 更多...
FlagStatus | PWR_GetFlagStatus (uint32_t PWR_FLAG)
| Checks whether the specified PWR flag is set or not. 更多...
void | PWR_ClearFlag (uint32_t PWR_FLAG)
| Clears the PWR's pending flags. 更多...
void | PWR_UnlockANA (void)
| Disable ANCTL register write-protection function. 更多...
void | PWR_LockANA (void)
| Enable ANCTL register write-protection function. 更多...

## 详细描述

PWR driver modules

## 函数说明

## ◆ PWR_BackupAccessCmd()

void PWR_BackupAccessCmd | ( | FunctionalState | NewState | ) |

Enables or disables access to the RTC and backup registers.

参数

  NewState | new state of the access to the RTC and backup registers. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ PWR_ClearFlag()

void PWR_ClearFlag | ( | uint32_t | PWR_FLAG | ) |

Clears the PWR's pending flags.

参数

  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 PWR_FLAG_SP: Stop flag PWR_FLAG_CK: Clock configuration reset flag

返回
  None

## ◆ PWR_EnterSLEEPMode()

void PWR_EnterSLEEPMode | ( | uint8_t | PWR_FCLK,
|  | uint8_t | PWR_EntryMode
| ) |  |

Enters SLEEP mode.

参数

  PWR_FCLK | specifies the M3 FCLK frequency in SLEEP mode. This parameter can be one of the following values: PWR_FCLK_NoChange: the M3 FCLK frequency not change when enter SLEEP mode. PWR_FCLK_Div2: the M3 FCLK frequency divide by 2 when enter SLEEP mode.
  PWR_EntryMode | specifies enter SLEEP mode with WFI or WFE instruction. This parameter can be one of the following values: PWR_EntryMode_WFI: enter SLEEP mode with WFI instruction PWR_EntryMode_WFE: enter SLEEP mode with WFE instruction

返回
  None

## ◆ PWR_EnterSTANDBYMode()

void PWR_EnterSTANDBYMode | ( | void |  | ) |

Enters STANDBY mode.

参数

  None |

返回
  None

## ◆ PWR_EnterSTOPMode()

void PWR_EnterSTOPMode | ( | uint16_t | PWR_STOPMode,
|  | uint8_t | PWR_EntryMode
| ) |  |

Enters STOP mode.

参数

  PWR_STOPMode | specifies the STOP mode. This parameter can be one of the following values: PWR_STOPMode_LP1: STOP LP1 mode. PWR_STOPMode_LP2: STOP LP2 mode. PWR_STOPMode_LP3_S32KON: STOP LP3 mode with 32K SRAM on. PWR_STOPMode_LP3_S32KOFF: STOP LP3 mode with 32K SRAM off. PWR_STOPMode_LP4_S32KON: STOP LP4 mode with 32K SRAM on. PWR_STOPMode_LP4_S32KOFF: STOP LP4 mode with 32K SRAM off.
  PWR_EntryMode | specifies enter STOP mode with WFI or WFE instruction. This parameter can be one of the following values: PWR_EntryMode_WFI: enter STOP mode with WFI instruction PWR_EntryMode_WFE: enter STOP mode with WFE instruction

返回
  None

## ◆ PWR_GetFlagStatus()

FlagStatus PWR_GetFlagStatus | ( | uint32_t | PWR_FLAG | ) |

Checks whether the specified PWR flag is set or not.

参数

  PWR_FLAG | specifies the flag to check. This parameter can be one of the following values: PWR_FLAG_PVDO: PVD Output PWR_FLAG_WU: Wake Up flag PWR_FLAG_SB: StandBy flag PWR_FLAG_SP: Stop flag PWR_FLAG_CK: Clock configuration reset flag

返回
  The new state of PWR_FLAG (SET or RESET).

## ◆ PWR_LockANA()

void PWR_LockANA | ( | void |  | ) |

Enable ANCTL register write-protection function.

参数

  None |

返回
  None

## ◆ PWR_UnlockANA()

void PWR_UnlockANA | ( | void |  | ) |

Disable ANCTL register write-protection function.

参数

  None |

返回
  None

## ◆ PWR_WakeUpPinCmd()

void PWR_WakeUpPinCmd | ( | FunctionalState | NewState | ) |

Enables or disables the WakeUp Pin functionality.

参数

  NewState | new state of the WakeUp Pin functionality. This parameter can be: ENABLE or DISABLE.

返回
  None