EFM32 Pearl Gecko Software Documentation  efm32pg1-doc-4.2.1

Energy Management Unit (EMU) Peripheral API

. More...

Data Structures

struct  EMU_EM23Init_TypeDef
 
struct  EMU_EM4Init_TypeDef
 
struct  EMU_DCDCInit_TypeDef
 
struct  EMU_VmonInit_TypeDef
 
struct  EMU_VmonHystInit_TypeDef
 

Macros

#define EMU_EM23INIT_DEFAULT   { false } /* Reduced voltage regulator drive strength in EM2 and EM3 */
 
#define EMU_EM4INIT_DEFAULT
 
#define EMU_DCDCINIT_DEFAULT
 
#define EMU_VMONINIT_DEFAULT
 
#define EMU_VMONHYSTINIT_DEFAULT
 
#define PWRCFG_DCDCTODVDD_VMIN   1200
 
#define PWRCFG_DCDCTODVDD_VMAX   3000
 

Enumerations

enum  EMU_BODMode_TypeDef {
  emuBODMode_Active,
  emuBODMode_Inactive
}
 
enum  EMU_EM4State_TypeDef {
  emuEM4Hibernate = EMU_EM4CTRL_EM4STATE_EM4H,
  emuEM4Shutoff = EMU_EM4CTRL_EM4STATE_EM4S
}
 
enum  EMU_EM4PinRetention_TypeDef {
  emuPinRetentionDisable = EMU_EM4CTRL_EM4IORETMODE_DISABLE,
  emuPinRetentionEm4Exit = EMU_EM4CTRL_EM4IORETMODE_EM4EXIT,
  emuPinRetentionLatch = EMU_EM4CTRL_EM4IORETMODE_SWUNLATCH
}
 
enum  EMU_PowerConfig_TypeDef { emuPowerConfig_DcdcToDvdd = EMU_PWRCFG_PWRCFG_DCDCTODVDD }
 
enum  EMU_DcdcMode_TypeDef {
  emuDcdcMode_Bypass = EMU_DCDCCTRL_DCDCMODE_BYPASS,
  emuDcdcMode_LowNoise = EMU_DCDCCTRL_DCDCMODE_LOWNOISE
}
 
enum  EMU_DcdcAnaPeripheralPower_TypeDef {
  emuDcdcAnaPeripheralPower_AVDD = EMU_PWRCTRL_ANASW_AVDD,
  emuDcdcAnaPeripheralPower_DCDC = EMU_PWRCTRL_ANASW_DVDD
}
 
enum  EMU_DcdcLnTransientMode_TypeDef {
  emuDcdcLnHighEfficiency = 0,
  emuDcdcLnFastTransient = EMU_DCDCMISCCTRL_LNFORCECCM
}
 
enum  EMU_DcdcLnRcoBand_TypeDef {
  EMU_DcdcLnRcoBand_3MHz = 0,
  EMU_DcdcLnRcoBand_4MHz = 1,
  EMU_DcdcLnRcoBand_5MHz = 2,
  EMU_DcdcLnRcoBand_6MHz = 3,
  EMU_DcdcLnRcoBand_7MHz = 4,
  EMU_DcdcLnRcoBand_8MHz = 5,
  EMU_DcdcLnRcoBand_9MHz = 6,
  EMU_DcdcLnRcoBand_10MHz = 7
}
 
enum  EMU_VmonChannel_TypeDef {
  emuVmonChannel_AVDD,
  emuVmonChannel_ALTAVDD,
  emuVmonChannel_DVDD,
  emuVmonChannel_IOVDD0
}
 
enum  errataFixDcdcHs_TypeDef {
  errataFixDcdcHsInit,
  errataFixDcdcHsTrimSet,
  errataFixDcdcHsLnWaitDone
}
 

Functions

__STATIC_INLINE void EMU_EnterEM1 (void)
 Enter energy mode 1 (EM1).
 
void EMU_EM23Init (EMU_EM23Init_TypeDef *em23Init)
 Update EMU module with Energy Mode 2 and 3 configuration. More...
 
void EMU_EM4Init (EMU_EM4Init_TypeDef *em4Init)
 Update EMU module with Energy Mode 4 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...
 
bool EMU_DCDCInit (EMU_DCDCInit_TypeDef *dcdcInit)
 Configure DCDC regulator. More...
 
void EMU_DCDCModeSet (EMU_DcdcMode_TypeDef dcdcMode)
 Set DCDC regulator operating mode. More...
 
bool EMU_DCDCOutputVoltageSet (uint32_t mV, bool setLpVoltage, bool setLnVoltage)
 Set DCDC output voltage. More...
 
void EMU_DCDCOptimizeSlice (uint32_t mAEm0LoadCurrent)
 Optimize DCDC slice count based on the estimated average load current in EM0. More...
 
void EMU_DCDCLnRcoBandSet (EMU_DcdcLnRcoBand_TypeDef band)
 Set DCDC Low-noise RCO band. More...
 
bool EMU_DCDCPowerOff (void)
 Power off the DCDC regulator. More...
 
void EMU_VmonInit (EMU_VmonInit_TypeDef *vmonInit)
 Initialize VMON channel. More...
 
void EMU_VmonHystInit (EMU_VmonHystInit_TypeDef *vmonInit)
 Initialize VMON channel with hysteresis (separate rise and fall triggers). More...
 
void EMU_VmonEnable (EMU_VmonChannel_TypeDef channel, bool enable)
 Enable or disable a VMON channel. More...
 
bool EMU_VmonChannelStatusGet (EMU_VmonChannel_TypeDef channel)
 Get the status of a voltage monitor channel. More...
 
__STATIC_INLINE bool EMU_VmonStatusGet (void)
 Get the status of the voltage monitor (VMON). 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...
 
__STATIC_INLINE void EMU_Unlock (void)
 Unlock the EMU so that writing to locked registers again is possible.
 
__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.
 
__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.
 
__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.
 

Variables

errataFixDcdcHs_TypeDef errataFixDcdcHsState = errataFixDcdcHsInit
 

Detailed Description

Macro Definition Documentation

#define EMU_EM23INIT_DEFAULT   { false } /* Reduced voltage regulator drive strength in EM2 and EM3 */

Default initialization of EM2 and 3 configuration

Definition at line 245 of file em_emu.h.

#define EMU_EM4INIT_DEFAULT
Value:
{ \
false, /* Retain LFXO configuration upon EM4 entry */ \
false, /* Retain LFRCO configuration upon EM4 entry */ \
false, /* Retain ULFRCO configuration upon EM4 entry */ \
emuEM4Shutoff, /* Use EM4 shutoff state */ \
emuPinRetentionDisable, /* Do not retain pins in EM4 */ \
}

Default initialization of EM4 configuration

Definition at line 284 of file em_emu.h.

#define EMU_DCDCINIT_DEFAULT
Value:
{ \
emuPowerConfig_DcdcToDvdd, /* DCDC to DVDD */ \
emuDcdcMode_LowNoise, /* Low-niose mode in EM0 (can be set to LowPower on EFM32PG revB0) */ \
1800, /* Nominal output voltage for DVDD mode, 1.8V */ \
5, /* Nominal EM0 load current of less than 5mA */ \
10, /* Nominal EM2/3 load current less than 10uA */ \
160, /* Maximum peak current of 160mA */ \
emuDcdcAnaPeripheralPower_DCDC,/* Select DCDC as analog power supply (lower power) */ \
emuDcdcLnHighEfficiency, /* Use low-noise high-efficiency mode (ignored if emuDcdcMode_LowPower) */ \
}

Default DCDC initialization

Definition at line 367 of file em_emu.h.

#define EMU_VMONINIT_DEFAULT
Value:
{ \
emuVmonChannel_AVDD, /* AVDD VMON channel */ \
3200, /* 3.2 V threshold */ \
false, /* Don't wake from EM4H on rising edge */ \
false, /* Don't wake from EM4H on falling edge */ \
true, /* Enable VMON channel */ \
false /* Don't disable IO0 retention */ \
}

Default VMON initialization structure

Definition at line 407 of file em_emu.h.

#define EMU_VMONHYSTINIT_DEFAULT
Value:
{ \
emuVmonChannel_AVDD, /* AVDD VMON channel */ \
3200, /* 3.2 V rise threshold */ \
3200, /* 3.2 V fall threshold */ \
false, /* Don't wake from EM4H on rising edge */ \
false, /* Don't wake from EM4H on falling edge */ \
true /* Enable VMON channel */ \
}

Default VMON Hysteresis initialization structure

Definition at line 429 of file em_emu.h.

Enumeration Type Documentation

BOD threshold setting selector, active or inactive mode

Enumerator
emuBODMode_Active 

Configure BOD threshold for active mode

emuBODMode_Inactive 

Configure BOD threshold for inactive mode

Definition at line 121 of file em_emu.h.

EM4 modes

Enumerator
emuEM4Hibernate 

EM4 Hibernate

emuEM4Shutoff 

EM4 Shutoff

Definition at line 131 of file em_emu.h.

Enumerator
emuPinRetentionDisable 

No Retention: Pads enter reset state when entering EM4

emuPinRetentionEm4Exit 

Retention through EM4: Pads enter reset state when exiting EM4

emuPinRetentionLatch 

Retention through EM4 and wakeup: call EMU_UnlatchPinRetention() to release pins from retention after EM4 wakeup

Definition at line 142 of file em_emu.h.

Power configurations

Enumerator
emuPowerConfig_DcdcToDvdd 

DCDC is connected to DVDD

Definition at line 157 of file em_emu.h.

DCDC operating modes

Enumerator
emuDcdcMode_Bypass 

DCDC regulator bypass

emuDcdcMode_LowNoise 

DCDC low-noise mode

Definition at line 166 of file em_emu.h.

DCDC to DVDD mode analog peripheral power supply select

Enumerator
emuDcdcAnaPeripheralPower_AVDD 

Select AVDD as analog power supply. Typically lower noise, but less energy efficient.

emuDcdcAnaPeripheralPower_DCDC 

Select DCDC (DVDD) as analog power supply. Typically more energy efficient, but more noise.

Definition at line 177 of file em_emu.h.

DCDC Low-noise efficiency mode

Enumerator
emuDcdcLnHighEfficiency 

High efficiency mode

emuDcdcLnFastTransient 

Fast transient response mode

Definition at line 188 of file em_emu.h.

DCDC Low-noise RCO band select

Enumerator
EMU_DcdcLnRcoBand_3MHz 

Set RCO to 3MHz

EMU_DcdcLnRcoBand_4MHz 

Set RCO to 4MHz

EMU_DcdcLnRcoBand_5MHz 

Set RCO to 5MHz

EMU_DcdcLnRcoBand_6MHz 

Set RCO to 6MHz

EMU_DcdcLnRcoBand_7MHz 

Set RCO to 7MHz

EMU_DcdcLnRcoBand_8MHz 

Set RCO to 8MHz

EMU_DcdcLnRcoBand_9MHz 

Set RCO to 9MHz

EMU_DcdcLnRcoBand_10MHz 

Set RCO to 10MHz

Definition at line 201 of file em_emu.h.

VMON channels

Definition at line 225 of file em_emu.h.

Function Documentation

void EMU_EM23Init ( EMU_EM23Init_TypeDef em23Init)
Parameters
[in]em23InitEnergy Mode 2 and 3 configuration structure

Definition at line 753 of file em_emu.c.

References EMU_EM23Init_TypeDef::em23VregFullEn, and EMU.

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!

Note
If restoring core clock to use the HFXO oscillator, which has been disabled during EM2 mode, this function will stall until the oscillator has stabilized. Stalling time can be reduced by adding interrupt support detecting stable oscillator, and an asynchronous switch to the original oscillator. See CMU documentation. Such a feature is however outside the scope of the implementation in this function.
If HFXO is re-enabled by this function, and NOT used to clock the core, this function will not wait for HFXO to stabilize. This must be considered by the application if trying to use features relying on that oscillator upon return.
If a debugger is attached, the AUXHFRCO will not be disabled if enabled upon entering EM2. It will thus remain enabled when returning to EM0 regardless of the restore parameter.
If HFXO autostart and select is enabled by using CMU_HFXOAutostartEnable(), the starting and selecting of the core clocks will be identical to the user independently of the value of the restore parameter when waking up on the wakeup sources corresponding to the autostart and select setting.
Parameters
[in]restore
  • true - restore oscillators and clocks, see function details.
  • false - do not restore oscillators and clocks, see function details.
The 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_HFCLKSTATUS_SELECTED_HFRCO, 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!

Note
If restoring core clock to use an oscillator other than HFRCO, this function will stall until the oscillator has stabilized. Stalling time can be reduced by adding interrupt support detecting stable oscillator, and an asynchronous switch to the original oscillator. See CMU documentation. Such a feature is however outside the scope of the implementation in this function.
If HFXO/LFXO/LFRCO are re-enabled by this function, and NOT used to clock the core, this function will not wait for those oscillators to stabilize. This must be considered by the application if trying to use features relying on those oscillators upon return.
If a debugger is attached, the AUXHFRCO will not be disabled if enabled upon entering EM3. It will thus remain enabled when returning to EM0 regardless of the restore parameter.
Parameters
[in]restore
  • true - restore oscillators and clocks, see function details.
  • false - do not restore oscillators and clocks, see function details.
The 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_HFCLKSTATUS_SELECTED_HFRCO, CMU_Lock(), CMU_LOCK_LOCKKEY_LOCKED, CMU_OSCENCMD_LFRCODIS, CMU_OSCENCMD_LFXODIS, CMU_Unlock(), and SystemCoreClockUpdate().

void EMU_EnterEM4 ( void  )
Note
Only a power on reset or external reset pin can wake the device from EM4.

Definition at line 626 of file em_emu.c.

References _EMU_EM4CTRL_EM4ENTRY_MASK, _EMU_EM4CTRL_EM4ENTRY_SHIFT, EMU, and EMU_Unlock().

void EMU_MemPwrDown ( uint32_t  blocks)
Parameters
[in]blocksSpecifies 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.
Note
Only a reset can make the specified memory block(s) available for use after having been powered down. Function will be void for devices not supporting this feature.

Definition at line 687 of file em_emu.c.

References _EMU_RAM0CTRL_RAMPOWERDOWN_MASK, 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().

void EMU_DCDCModeSet ( EMU_DcdcMode_TypeDef  dcdcMode)
Parameters
[in]dcdcModeDCDC mode

Definition at line 1182 of file em_emu.c.

References _EMU_DCDCCLIMCTRL_BYPLIMEN_SHIFT, _EMU_DCDCCTRL_DCDCMODE_MASK, BUS_RegBitWrite(), EMU, EMU_DCDCSYNC_DCDCCTRLBUSY, and emuDcdcMode_Bypass.

Referenced by EMU_DCDCInit().

bool EMU_DCDCOutputVoltageSet ( uint32_t  mV,
bool  setLpVoltage,
bool  setLnVoltage 
)
Parameters
[in]mVTarget DCDC output voltage in mV
Returns
True if the mV parameter is valid

Definition at line 1291 of file em_emu.c.

References _DEVINFO_DCDCLNVCTRL0_1V2LNATT0_MASK, _DEVINFO_DCDCLNVCTRL0_1V2LNATT0_SHIFT, _DEVINFO_DCDCLNVCTRL0_1V8LNATT0_MASK, _DEVINFO_DCDCLNVCTRL0_1V8LNATT0_SHIFT, _DEVINFO_DCDCLNVCTRL0_1V8LNATT1_MASK, _DEVINFO_DCDCLNVCTRL0_1V8LNATT1_SHIFT, _DEVINFO_DCDCLNVCTRL0_3V0LNATT1_MASK, _DEVINFO_DCDCLNVCTRL0_3V0LNATT1_SHIFT, _DEVINFO_DCDCLPVCTRL0_1V2LPATT0LPCMPBIAS0_MASK, _DEVINFO_DCDCLPVCTRL0_1V2LPATT0LPCMPBIAS0_SHIFT, _DEVINFO_DCDCLPVCTRL0_1V2LPATT0LPCMPBIAS1_MASK, _DEVINFO_DCDCLPVCTRL0_1V2LPATT0LPCMPBIAS1_SHIFT, _DEVINFO_DCDCLPVCTRL0_1V8LPATT0LPCMPBIAS0_MASK, _DEVINFO_DCDCLPVCTRL0_1V8LPATT0LPCMPBIAS0_SHIFT, _DEVINFO_DCDCLPVCTRL0_1V8LPATT0LPCMPBIAS1_MASK, _DEVINFO_DCDCLPVCTRL0_1V8LPATT0LPCMPBIAS1_SHIFT, _DEVINFO_DCDCLPVCTRL1_1V2LPATT0LPCMPBIAS2_MASK, _DEVINFO_DCDCLPVCTRL1_1V2LPATT0LPCMPBIAS2_SHIFT, _DEVINFO_DCDCLPVCTRL1_1V2LPATT0LPCMPBIAS3_MASK, _DEVINFO_DCDCLPVCTRL1_1V2LPATT0LPCMPBIAS3_SHIFT, _DEVINFO_DCDCLPVCTRL1_1V8LPATT0LPCMPBIAS2_MASK, _DEVINFO_DCDCLPVCTRL1_1V8LPATT0LPCMPBIAS2_SHIFT, _DEVINFO_DCDCLPVCTRL1_1V8LPATT0LPCMPBIAS3_MASK, _DEVINFO_DCDCLPVCTRL1_1V8LPATT0LPCMPBIAS3_SHIFT, _DEVINFO_DCDCLPVCTRL2_1V8LPATT1LPCMPBIAS0_MASK, _DEVINFO_DCDCLPVCTRL2_1V8LPATT1LPCMPBIAS0_SHIFT, _DEVINFO_DCDCLPVCTRL2_1V8LPATT1LPCMPBIAS1_MASK, _DEVINFO_DCDCLPVCTRL2_1V8LPATT1LPCMPBIAS1_SHIFT, _DEVINFO_DCDCLPVCTRL2_3V0LPATT1LPCMPBIAS0_MASK, _DEVINFO_DCDCLPVCTRL2_3V0LPATT1LPCMPBIAS0_SHIFT, _DEVINFO_DCDCLPVCTRL2_3V0LPATT1LPCMPBIAS1_MASK, _DEVINFO_DCDCLPVCTRL2_3V0LPATT1LPCMPBIAS1_SHIFT, _DEVINFO_DCDCLPVCTRL3_1V8LPATT1LPCMPBIAS2_MASK, _DEVINFO_DCDCLPVCTRL3_1V8LPATT1LPCMPBIAS2_SHIFT, _DEVINFO_DCDCLPVCTRL3_1V8LPATT1LPCMPBIAS3_MASK, _DEVINFO_DCDCLPVCTRL3_1V8LPATT1LPCMPBIAS3_SHIFT, _DEVINFO_DCDCLPVCTRL3_3V0LPATT1LPCMPBIAS2_MASK, _DEVINFO_DCDCLPVCTRL3_3V0LPATT1LPCMPBIAS2_SHIFT, _DEVINFO_DCDCLPVCTRL3_3V0LPATT1LPCMPBIAS3_MASK, _DEVINFO_DCDCLPVCTRL3_3V0LPATT1LPCMPBIAS3_SHIFT, _EMU_DCDCLNVCTRL_LNVREF_SHIFT, _EMU_DCDCLPVCTRL_LPVREF_SHIFT, _EMU_DCDCMISCCTRL_LPCMPBIAS_MASK, _EMU_DCDCMISCCTRL_LPCMPBIAS_SHIFT, _EMU_PWRCFG_PWRCFG_MASK, DEVINFO, EMU, EMU_DCDCLNVCTRL_LNATT, EMU_DCDCLPVCTRL_LPATT, EMU_DCDCMISCCTRL_LPCMPBIAS_BIAS0, EMU_DCDCMISCCTRL_LPCMPBIAS_BIAS1, EMU_DCDCMISCCTRL_LPCMPBIAS_BIAS2, EMU_DCDCMISCCTRL_LPCMPBIAS_BIAS3, and EMU_PWRCFG_PWRCFG_DCDCTODVDD.

Referenced by EMU_DCDCInit().

void EMU_DCDCOptimizeSlice ( uint32_t  mAEm0LoadCurrent)
void EMU_DCDCLnRcoBandSet ( EMU_DcdcLnRcoBand_TypeDef  band)
Parameters
[in]bandRCO band to set.

Definition at line 1575 of file em_emu.c.

References _EMU_DCDCLNFREQCTRL_RCOBAND_MASK, _EMU_DCDCLNFREQCTRL_RCOBAND_SHIFT, and EMU.

bool EMU_DCDCPowerOff ( void  )

This function powers off the DCDC controller. This function should only be used if the external power circuit is wired for no DCDC. If the external power circuit is wired for DCDC usage, then use EMU_DCDCInit() and set the DCDC in bypass mode to disable DCDC.

Returns
Return false if the DCDC could not be disabled.

Definition at line 1594 of file em_emu.c.

References _EMU_PWRCFG_PWRCFG_MASK, EMU, and EMU_DCDCCTRL_DCDCMODE_OFF.

void EMU_VmonEnable ( EMU_VmonChannel_TypeDef  channel,
bool  enable 
)
Parameters
[in]channelVMON channel to enable/disable
[in]enableWhether to enable or disable

Definition at line 1736 of file em_emu.c.

References _EMU_VMONALTAVDDCTRL_EN_SHIFT, _EMU_VMONAVDDCTRL_EN_SHIFT, _EMU_VMONDVDDCTRL_EN_SHIFT, _EMU_VMONIO0CTRL_EN_SHIFT, BUS_RegBitWrite(), and EMU.

bool EMU_VmonChannelStatusGet ( EMU_VmonChannel_TypeDef  channel)
Parameters
[in]channelVMON channel to get status for
Returns
Status of the selected VMON channel. True if channel is triggered.

Definition at line 1777 of file em_emu.c.

References _EMU_STATUS_VMONALTAVDD_SHIFT, _EMU_STATUS_VMONAVDD_SHIFT, _EMU_STATUS_VMONDVDD_SHIFT, _EMU_STATUS_VMONIO0_SHIFT, BUS_RegBitRead(), and EMU.

__STATIC_INLINE bool EMU_VmonStatusGet ( void  )
Returns
Status of the VMON. True if all the enabled channels are ready, false if one or more of the enabled channels are not ready.

Definition at line 491 of file em_emu.h.

References _EMU_STATUS_VMONRDY_SHIFT, BUS_RegBitRead(), and EMU.

__STATIC_INLINE void EMU_IntClear ( uint32_t  flags)
Parameters
[in]flagsPending EMU interrupt sources to clear. Use one or more valid interrupt flags for the EMU module (EMU_IFC_nnn).

Definition at line 506 of file em_emu.h.

References EMU.

__STATIC_INLINE void EMU_IntDisable ( uint32_t  flags)
Parameters
[in]flagsEMU interrupt sources to disable. Use one or more valid interrupt flags for the EMU module (EMU_IEN_nnn).

Definition at line 520 of file em_emu.h.

References EMU.

__STATIC_INLINE void EMU_IntEnable ( uint32_t  flags)
Note
Depending on the use, a pending interrupt may already be set prior to enabling the interrupt. Consider using EMU_IntClear() prior to enabling if such a pending interrupt should be ignored.
Parameters
[in]flagsEMU interrupt sources to enable. Use one or more valid interrupt flags for the EMU module (EMU_IEN_nnn).

Definition at line 539 of file em_emu.h.

References EMU.

__STATIC_INLINE uint32_t EMU_IntGet ( void  )
Note
The event bits are not cleared by the use of this function.
Returns
EMU interrupt sources pending. Returns one or more valid interrupt flags for the EMU module (EMU_IF_nnn).

Definition at line 556 of file em_emu.h.

References EMU.

__STATIC_INLINE uint32_t EMU_IntGetEnabled ( void  )
Note
Interrupt flags are not cleared by the use of this function.
Returns
Pending and enabled EMU interrupt sources The return value is the bitwise AND of
  • the enabled interrupt sources in EMU_IEN and
  • the pending interrupt flags EMU_IF

Definition at line 576 of file em_emu.h.

References EMU.

__STATIC_INLINE void EMU_IntSet ( uint32_t  flags)
Parameters
[in]flagsEMU interrupt sources to set to pending. Use one or more valid interrupt flags for the EMU module (EMU_IFS_nnn).

Definition at line 593 of file em_emu.h.

References EMU.

__STATIC_INLINE void EMU_Lock ( void  )
Note
If locking the EMU registers, they must be unlocked prior to using any EMU API functions modifying EMU registers, excluding interrupt control and regulator control if the architecture has a EMU_PWRCTRL register. An exception to this is the energy mode entering API (EMU_EnterEMn()), which can be used when the EMU registers are locked.

Definition at line 650 of file em_emu.h.

References EMU, and EMU_LOCK_LOCKKEY_LOCK.

Referenced by RMU_ResetCauseClear().