MG32L003 Standard Peripherals Firmware Library
Modules | Functions

PWR driver modules. More...

Modules

 PWR_Exported_Constants
 
 PWR_Private_Macros
 
 PWR_Private_Functions
 

Functions

void PWR_EnterSLEEPMode (uint8_t SLEEPEntry)
 Enters Sleep mode. More...
 
void PWR_EnterDEEPSLEEPMode (void)
 Enters Deep Sleep mode. More...
 
void PWR_EnableSleepOnExit (void)
 Indicates Sleep-On-Exit when returning from Handler mode to Thread mode. More...
 
void PWR_DisableSleepOnExit (void)
 Disables Sleep-On-Exit feature when returning from Handler mode to Thread mode. More...
 
void PWR_EnableSEVOnPend (void)
 Enables CORTEX M0+ SEVONPEND bit. More...
 
void PWR_DisableSEVOnPend (void)
 Disables CORTEX M0+ SEVONPEND bit. More...
 

Detailed Description

PWR driver modules.

Function Documentation

◆ PWR_DisableSEVOnPend()

void PWR_DisableSEVOnPend ( void  )

Disables CORTEX M0+ SEVONPEND bit.

Note
Clears SEVONPEND bit of SCR register. When this bit is set, this causes WFE to wake up when an interrupt moves from inactive to pended.
Return values
None

◆ PWR_DisableSleepOnExit()

void PWR_DisableSleepOnExit ( void  )

Disables Sleep-On-Exit feature when returning from Handler mode to Thread mode.

Note
Clears SLEEPONEXIT bit of SCR register. When this bit is set, the processor re-enters SLEEP mode when an interruption handling is over.
Return values
None

◆ PWR_EnableSEVOnPend()

void PWR_EnableSEVOnPend ( void  )

Enables CORTEX M0+ SEVONPEND bit.

Note
Sets SEVONPEND bit of SCR register. When this bit is set, this causes WFE to wake up when an interrupt moves from inactive to pended.
Return values
None

◆ PWR_EnableSleepOnExit()

void PWR_EnableSleepOnExit ( void  )

Indicates Sleep-On-Exit when returning from Handler mode to Thread mode.

Note
Set SLEEPONEXIT bit of SCR register. When this bit is set, the processor re-enters SLEEP mode when an interruption handling is over. Setting this bit is useful when the processor is expected to run only on interruptions handling.
Return values
None

◆ PWR_EnterDEEPSLEEPMode()

void PWR_EnterDEEPSLEEPMode ( void  )

Enters Deep Sleep mode.

Note
In Deep Sleep mode, all I/O pins keep the same state as in Run mode.
Return values
None

◆ PWR_EnterSLEEPMode()

void PWR_EnterSLEEPMode ( uint8_t  SLEEPEntry)

Enters Sleep mode.

Note
In Sleep mode, all I/O pins keep the same state as in Run mode.
Parameters
SLEEPEntrySpecifies if SLEEP mode is entered with WFI or WFE instruction. When WFI entry is used, tick interrupt have to be disabled if not desired as the interrupt wake up source. This parameter can be one of the following values:
  • PWR_SLEEPENTRY_WFI: enter SLEEP mode with WFI instruction
  • PWR_SLEEPENTRY_WFE: enter SLEEP mode with WFE instruction
Return values
None