EFR32 Blue Gecko 12 Software Documentation
efr32bg12-doc-5.1.2
|
Energy management unit (EMU) peripheral API.
Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no obligation to support this Software. Silicon Labs is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.
Silicon Labs will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.
Definition in file em_emu.h.
Go to the source code of this file.
Data Structures | |
struct | EMU_DCDCInit_TypeDef |
struct | EMU_EM01Init_TypeDef |
struct | EMU_EM23Init_TypeDef |
struct | EMU_EM4Init_TypeDef |
struct | EMU_VmonHystInit_TypeDef |
struct | EMU_VmonInit_TypeDef |
Macros | |
#define | EMU_DCDCINIT_DEFAULT |
#define | EMU_EM01INIT_DEFAULT |
#define | EMU_EM23INIT_DEFAULT |
#define | EMU_EM4INIT_DEFAULT |
#define | EMU_VMONHYSTINIT_DEFAULT |
#define | EMU_VMONINIT_DEFAULT |
#define | emuDcdcLnFastTransient 160 |
#define | emuDcdcLnHighEfficiency -1 |
Typedefs | |
typedef int16_t | EMU_DcdcLnReverseCurrentControl_TypeDef |
Enumerations | |
enum | EMU_BODMode_TypeDef { emuBODMode_Active, emuBODMode_Inactive } |
enum | EMU_DcdcAnaPeripheralPower_TypeDef { emuDcdcAnaPeripheralPower_AVDD = EMU_PWRCTRL_ANASW_AVDD, emuDcdcAnaPeripheralPower_DCDC = EMU_PWRCTRL_ANASW_DVDD } |
enum | EMU_DcdcConductionMode_TypeDef { emuDcdcConductionMode_ContinuousLN, emuDcdcConductionMode_DiscontinuousLN } |
enum | EMU_DcdcLnCompCtrl_TypeDef { emuDcdcLnCompCtrl_1u0F, emuDcdcLnCompCtrl_4u7F } |
enum | EMU_DcdcLnRcoBand_TypeDef { emuDcdcLnRcoBand_3MHz = 0, emuDcdcLnRcoBand_4MHz = 1, emuDcdcLnRcoBand_5MHz = 2, emuDcdcLnRcoBand_6MHz = 3, emuDcdcLnRcoBand_7MHz = 4, emuDcdcLnRcoBand_8MHz = 5, emuDcdcLnRcoBand_9MHz = 6, emuDcdcLnRcoBand_10MHz = 7 } |
enum | EMU_DcdcMode_TypeDef { emuDcdcMode_Bypass = EMU_DCDCCTRL_DCDCMODE_BYPASS, emuDcdcMode_LowNoise = EMU_DCDCCTRL_DCDCMODE_LOWNOISE, emuDcdcMode_LowPower = EMU_DCDCCTRL_DCDCMODE_LOWPOWER } |
enum | EMU_EM4PinRetention_TypeDef { emuPinRetentionDisable = EMU_EM4CTRL_EM4IORETMODE_DISABLE, emuPinRetentionEm4Exit = EMU_EM4CTRL_EM4IORETMODE_EM4EXIT, emuPinRetentionLatch = EMU_EM4CTRL_EM4IORETMODE_SWUNLATCH } |
enum | EMU_EM4State_TypeDef { emuEM4Hibernate = EMU_EM4CTRL_EM4STATE_EM4H, emuEM4Shutoff = EMU_EM4CTRL_EM4STATE_EM4S } |
enum | EMU_PeripheralRetention_TypeDef { emuPeripheralRetention_LEUART0 = _EMU_EM23PERNORETAINCTRL_LEUART0DIS_MASK, emuPeripheralRetention_CSEN = _EMU_EM23PERNORETAINCTRL_CSENDIS_MASK, emuPeripheralRetention_LESENSE0 = _EMU_EM23PERNORETAINCTRL_LESENSE0DIS_MASK, emuPeripheralRetention_LETIMER0 = _EMU_EM23PERNORETAINCTRL_LETIMER0DIS_MASK, emuPeripheralRetention_ADC0 = _EMU_EM23PERNORETAINCTRL_ADC0DIS_MASK, emuPeripheralRetention_IDAC0 = _EMU_EM23PERNORETAINCTRL_IDAC0DIS_MASK, emuPeripheralRetention_VDAC0 = _EMU_EM23PERNORETAINCTRL_DAC0DIS_MASK, emuPeripheralRetention_I2C1 = _EMU_EM23PERNORETAINCTRL_I2C1DIS_MASK, emuPeripheralRetention_I2C0 = _EMU_EM23PERNORETAINCTRL_I2C0DIS_MASK, emuPeripheralRetention_ACMP1 = _EMU_EM23PERNORETAINCTRL_ACMP1DIS_MASK, emuPeripheralRetention_ACMP0 = _EMU_EM23PERNORETAINCTRL_ACMP0DIS_MASK, emuPeripheralRetention_PCNT2 = _EMU_EM23PERNORETAINCTRL_PCNT2DIS_MASK, emuPeripheralRetention_PCNT1 = _EMU_EM23PERNORETAINCTRL_PCNT1DIS_MASK, emuPeripheralRetention_PCNT0 = _EMU_EM23PERNORETAINCTRL_PCNT0DIS_MASK, emuPeripheralRetention_D1, emuPeripheralRetention_D2, emuPeripheralRetention_ALL } |
enum | EMU_PowerConfig_TypeDef { emuPowerConfig_DcdcToDvdd } |
enum | EMU_VmonChannel_TypeDef { emuVmonChannel_AVDD, emuVmonChannel_ALTAVDD, emuVmonChannel_DVDD, emuVmonChannel_IOVDD0 } |
enum | EMU_VScaleEM01_TypeDef { emuVScaleEM01_HighPerformance = _EMU_STATUS_VSCALE_VSCALE2, emuVScaleEM01_LowPower = _EMU_STATUS_VSCALE_VSCALE0 } |
enum | EMU_VScaleEM23_TypeDef { emuVScaleEM23_FastWakeup = _EMU_CTRL_EM23VSCALE_VSCALE2, emuVScaleEM23_LowPower = _EMU_CTRL_EM23VSCALE_VSCALE0 } |
enum | EMU_VScaleEM4H_TypeDef { emuVScaleEM4H_FastWakeup = _EMU_CTRL_EM4HVSCALE_VSCALE2, emuVScaleEM4H_LowPower = _EMU_CTRL_EM4HVSCALE_VSCALE0 } |
Functions | |
void | EMU_DCDCConductionModeSet (EMU_DcdcConductionMode_TypeDef conductionMode, bool rcoDefaultSet) |
Set DCDC LN regulator conduction mode. More... | |
bool | EMU_DCDCInit (const EMU_DCDCInit_TypeDef *dcdcInit) |
Configure DCDC regulator. More... | |
void | EMU_DCDCLnRcoBandSet (EMU_DcdcLnRcoBand_TypeDef band) |
Set DCDC Low-noise RCO band. More... | |
void | EMU_DCDCModeSet (EMU_DcdcMode_TypeDef dcdcMode) |
Set DCDC regulator operating mode. More... | |
void | EMU_DCDCOptimizeSlice (uint32_t em0LoadCurrent_mA) |
Optimize DCDC slice count based on the estimated average load current in EM0. More... | |
bool | EMU_DCDCOutputVoltageSet (uint32_t mV, bool setLpVoltage, bool setLnVoltage) |
Set DCDC output voltage. More... | |
bool | EMU_DCDCPowerOff (void) |
Power off the DCDC regulator. More... | |
void | EMU_EM01Init (const EMU_EM01Init_TypeDef *em01Init) |
Update EMU module with Energy Mode 0 and 1 configuration. More... | |
void | EMU_EM23Init (const EMU_EM23Init_TypeDef *em23Init) |
Update EMU module with Energy Mode 2 and 3 configuration. More... | |
__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. | |
void | EMU_EM4Init (const EMU_EM4Init_TypeDef *em4Init) |
Update EMU module with Energy Mode 4 configuration. More... | |
__STATIC_INLINE void | EMU_EnterEM1 (void) |
Enter energy mode 1 (EM1). | |
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_EnterEM4H (void) |
Enter energy mode 4 hibernate (EM4H). More... | |
void | EMU_EnterEM4S (void) |
Enter energy mode 4 shutoff (EM4S). More... | |
__STATIC_INLINE void | EMU_IntClear (uint32_t flags) |
Clear one or more pending EMU interrupts. More... | |
__STATIC_INLINE void | EMU_IntDisable (uint32_t flags) |
Disable one or more EMU interrupts. More... | |
__STATIC_INLINE void | EMU_IntEnable (uint32_t flags) |
Enable one or more EMU interrupts. More... | |
__STATIC_INLINE uint32_t | EMU_IntGet (void) |
Get pending EMU interrupt flags. More... | |
__STATIC_INLINE uint32_t | EMU_IntGetEnabled (void) |
Get enabled and pending EMU interrupt flags. Useful for handling more interrupt sources in the same interrupt handler. More... | |
__STATIC_INLINE void | EMU_IntSet (uint32_t flags) |
Set one or more pending EMU interrupts. More... | |
__STATIC_INLINE void | EMU_Lock (void) |
Lock the EMU in order to protect its registers against unintended modification. More... | |
void | EMU_MemPwrDown (uint32_t blocks) |
Power down memory block. More... | |
void | EMU_PeripheralRetention (EMU_PeripheralRetention_TypeDef periMask, bool enable) |
Set EM2 3 peripheral retention control. More... | |
__STATIC_INLINE void | EMU_PowerLock (void) |
Lock the EMU regulator control registers in order to protect against unintended modification. | |
__STATIC_INLINE void | EMU_PowerUnlock (void) |
Unlock the EMU power control registers so that writing to locked registers again is possible. | |
void | EMU_RamPowerDown (uint32_t start, uint32_t end) |
Power down RAM memory blocks. More... | |
void | EMU_Restore (void) |
Restore CMU HF clock select state, oscillator enable and voltage scaling (if available) after EMU_EnterEM2() or EMU_EnterEM3() are called with the restore parameter set to false. Calling this function is equivalent to calling EMU_EnterEM2() or EMU_EnterEM3() with the restore parameter set to true, but it allows the application to evaluate the wakeup reason before restoring state. | |
__STATIC_INLINE void | EMU_UnlatchPinRetention (void) |
When EM4 pin retention is set to emuPinRetentionLatch, then pins are retained through EM4 entry and wakeup. The pin state is released by calling this function. The feature allows peripherals or GPIO to be re-initialized after EM4 exit (reset), and when the initialization is done, this function can release pins and return control to the peripherals or GPIO. | |
__STATIC_INLINE void | EMU_Unlock (void) |
Unlock the EMU so that writing to locked registers again is possible. | |
void | EMU_UpdateOscConfig (void) |
Update EMU module with CMU oscillator selection/enable status. More... | |
bool | EMU_VmonChannelStatusGet (EMU_VmonChannel_TypeDef channel) |
Get the status of a voltage monitor channel. More... | |
void | EMU_VmonEnable (EMU_VmonChannel_TypeDef channel, bool enable) |
Enable or disable a VMON channel. More... | |
void | EMU_VmonHystInit (const EMU_VmonHystInit_TypeDef *vmonInit) |
Initialize VMON channel with hysteresis (separate rise and fall triggers). More... | |
void | EMU_VmonInit (const EMU_VmonInit_TypeDef *vmonInit) |
Initialize VMON channel. More... | |
__STATIC_INLINE bool | EMU_VmonStatusGet (void) |
Get the status of the voltage monitor (VMON). More... | |
void | EMU_VScaleEM01 (EMU_VScaleEM01_TypeDef voltage, bool wait) |
Force voltage scaling in EM0 and 1 to a specific voltage level. More... | |
void | EMU_VScaleEM01ByClock (uint32_t clockFrequency, bool wait) |
Voltage scale in EM0 and 1 by clock frequency. More... | |
__STATIC_INLINE EMU_VScaleEM01_TypeDef | EMU_VScaleGet (void) |
Get current voltage scaling level. More... | |
__STATIC_INLINE void | EMU_VScaleWait (void) |
Wait for voltage scaling to complete. | |