PWR driver modules.
More...
|
#define | PRE_LP() ((void(*)(void))((unsigned int)(pre_lp_code) | 0x01))() |
|
#define | POST_LP() ((void(*)(void))((unsigned int)(post_lp_code) | 0x01))() |
|
PWR driver modules.
◆ PWR_BackupAccessCmd()
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. |
- Returns
- None
◆ PWR_ClearFlag()
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
- PWR_FLAG_SP: Stop flag
- PWR_FLAG_CK: Clock configuration reset flag
|
- Returns
- None
◆ PWR_EnterSLEEPMode()
void PWR_EnterSLEEPMode |
( |
uint8_t |
PWR_FCLK, |
|
|
uint8_t |
PWR_EntryMode |
|
) |
| |
Enters SLEEP mode.
- Parameters
-
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
|
- Returns
- None
◆ PWR_EnterSTANDBYMode()
void PWR_EnterSTANDBYMode |
( |
void |
| ) |
|
Enters STANDBY mode.
- Parameters
-
- Returns
- None
◆ PWR_EnterSTOPMode()
void PWR_EnterSTOPMode |
( |
uint16_t |
PWR_STOPMode, |
|
|
uint8_t |
PWR_EntryMode |
|
) |
| |
Enters STOP mode.
- Parameters
-
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
|
- Returns
- None
◆ PWR_GetFlagStatus()
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_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
|
- Returns
- The new state of PWR_FLAG (SET or RESET).
◆ PWR_LockANA()
void PWR_LockANA |
( |
void |
| ) |
|
Enable ANCTL register write-protection function.
- Parameters
-
- Returns
- None
◆ PWR_UnlockANA()
void PWR_UnlockANA |
( |
void |
| ) |
|
Disable ANCTL register write-protection function.
- Parameters
-
- Returns
- None
◆ PWR_WakeUpPinCmd()
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. |
- Returns
- None