EFM32 Gecko Software Documentation
efm32g-doc-4.2.1
|
Energy Management Unit (EMU) Peripheral API
. More...
Data Structures | |
struct | EMU_EM23Init_TypeDef |
Macros | |
#define | EMU_EM23INIT_DEFAULT { false } /* Reduced voltage regulator drive strength in EM2 and EM3 */ |
Enumerations | |
enum | EMU_BODMode_TypeDef { emuBODMode_Active, emuBODMode_Inactive } |
Functions | |
__STATIC_INLINE void | EMU_EnterEM1 (void) |
Enter energy mode 1 (EM1). More... | |
void | EMU_EM23Init (EMU_EM23Init_TypeDef *em23Init) |
Update EMU module with Energy Mode 2 and 3 configuration. More... | |
void | EMU_EnterEM2 (bool restore) |
Enter energy mode 2 (EM2). More... | |
void | EMU_EnterEM3 (bool restore) |
Enter energy mode 3 (EM3). More... | |
void | EMU_EnterEM4 (void) |
Enter energy mode 4 (EM4). More... | |
void | EMU_MemPwrDown (uint32_t blocks) |
Power down memory block. More... | |
void | EMU_UpdateOscConfig (void) |
Update EMU module with CMU oscillator selection/enable status. More... | |
__STATIC_INLINE void | EMU_Lock (void) |
Lock the EMU in order to protect its registers against unintended modification. More... | |
__STATIC_INLINE void | EMU_Unlock (void) |
Unlock the EMU so that writing to locked registers again is possible. | |
__STATIC_INLINE void | EMU_EM2Block (void) |
Block entering EM2 or higher number energy modes. | |
__STATIC_INLINE void | EMU_EM2UnBlock (void) |
Unblock entering EM2 or higher number energy modes. | |
#define EMU_EM23INIT_DEFAULT { false } /* Reduced voltage regulator drive strength in EM2 and EM3 */ |
enum EMU_BODMode_TypeDef |
__STATIC_INLINE void EMU_EnterEM1 | ( | void | ) |
Default initialization of EM4 configuration
Definition at line 448 of file em_emu.h.
Referenced by CAPSENSE_Measure(), UARTDRV_ReceiveB(), and UARTDRV_TransmitB().
void EMU_EM23Init | ( | EMU_EM23Init_TypeDef * | em23Init | ) |
[in] | em23Init | Energy Mode 2 and 3 configuration structure |
Definition at line 753 of file em_emu.c.
References EMU_EM23Init_TypeDef::em23VregFullEn, EMU, and EMU_CTRL_EMVREG.
void EMU_EnterEM2 | ( | bool | restore | ) |
When entering EM2, the high frequency clocks are disabled, ie HFXO, HFRCO and AUXHFRCO (for AUXHFRCO, see exception note below). When re-entering EM0, HFRCO is re-enabled and the core will be clocked by the configured HFRCO band. This ensures a quick wakeup from EM2.
However, prior to entering EM2, the core may have been using another oscillator than HFRCO. The restore
parameter gives the user the option to restore all HF oscillators according to state prior to entering EM2, as well as the clock used to clock the core. This restore procedure is handled by SW. However, since handled by SW, it will not be restored before completing the interrupt function(s) waking up the core!
restore
parameter. restore
parameter when waking up on the wakeup sources corresponding to the autostart and select setting.[in] | restore |
|
restore
option should only be used if all clock control is done via the CMU API. Definition at line 413 of file em_emu.c.
References CMU, CMU_STATUS_HFRCOSEL, and SystemCoreClockUpdate().
Referenced by CAPLESENSE_Sleep().
void EMU_EnterEM3 | ( | bool | restore | ) |
When entering EM3, the high frequency clocks are disabled by HW, ie HFXO, HFRCO and AUXHFRCO (for AUXHFRCO, see exception note below). In addition, the low frequency clocks, ie LFXO and LFRCO are disabled by SW. When re-entering EM0, HFRCO is re-enabled and the core will be clocked by the configured HFRCO band. This ensures a quick wakeup from EM3.
However, prior to entering EM3, the core may have been using another oscillator than HFRCO. The restore
parameter gives the user the option to restore all HF/LF oscillators according to state prior to entering EM3, as well as the clock used to clock the core. This restore procedure is handled by SW. However, since handled by SW, it will not be restored before completing the interrupt function(s) waking up the core!
restore
parameter.[in] | restore |
|
restore
option should only be used if all clock control is done via the CMU API. Definition at line 529 of file em_emu.c.
References CMU, CMU_Lock(), CMU_LOCK_LOCKKEY_LOCKED, CMU_OSCENCMD_LFRCODIS, CMU_OSCENCMD_LFXODIS, CMU_STATUS_HFRCOSEL, CMU_Unlock(), and SystemCoreClockUpdate().
void EMU_EnterEM4 | ( | void | ) |
Definition at line 626 of file em_emu.c.
References _EMU_CTRL_EM4CTRL_MASK, _EMU_CTRL_EM4CTRL_SHIFT, EMU, and EMU_Unlock().
void EMU_MemPwrDown | ( | uint32_t | blocks | ) |
[in] | blocks | Specifies a logical OR of bits indicating memory blocks to power down. Bit 0 selects block 1, bit 1 selects block 2, etc. Memory block 0 cannot be disabled. Please refer to the reference manual for available memory blocks for a device. |
Definition at line 687 of file em_emu.c.
References _EMU_MEMCTRL_POWERDOWN_MASK, _EMU_MEMCTRL_POWERDOWN_SHIFT, and EMU.
void EMU_UpdateOscConfig | ( | void | ) |
When entering EM2 and EM3, the HW may change the core clock oscillator used, as well as disabling some oscillators. The user may optionally select to restore the oscillators after waking up from EM2 and EM3 through the SW API.
However, in order to support this in a safe way, the EMU module must be kept up-to-date on the actual selected configuration. The CMU module must keep the EMU module up-to-date.
This function is mainly intended for internal use by the CMU module, but if the applications changes oscillator configurations without using the CMU API, this function can be used to keep the EMU module up-to-date.
Definition at line 736 of file em_emu.c.
References CMU.
Referenced by CMU_ClockSelectSet(), and CMU_OscillatorEnable().
__STATIC_INLINE void EMU_Lock | ( | void | ) |
Definition at line 650 of file em_emu.h.
References EMU, and EMU_LOCK_LOCKKEY_LOCK.
Referenced by RMU_ResetCauseClear().