EMUEMLIB
Detailed Description
Energy Management Unit (EMU) Peripheral API.
This module contains functions to control the EMU peripheral of Silicon Labs 32-bit MCUs and SoCs. The EMU handles the different low energy modes in Silicon Labs microcontrollers.
Data Structures |
|
struct | EMU_BUPDInit_TypeDef |
struct | EMU_EM23Init_TypeDef |
struct | EMU_EM4Init_TypeDef |
Macros |
|
#define | EMU_BUPDINIT_DEFAULT |
#define | EMU_EM23INIT_DEFAULT |
#define | EMU_EM4INIT_DEFAULT |
Enumerations |
|
enum |
EMU_BODMode_TypeDef
{
emuBODMode_Active , emuBODMode_Inactive } |
enum |
EMU_EM4Osc_TypeDef
{
emuEM4Osc_ULFRCO = EMU_EM4CONF_OSC_ULFRCO, emuEM4Osc_LFXO = EMU_EM4CONF_OSC_LFXO, emuEM4Osc_LFRCO = EMU_EM4CONF_OSC_LFRCO } |
enum |
EMU_Power_TypeDef
{
emuPower_None = EMU_BUINACT_PWRCON_NONE, emuPower_BUMain = EMU_BUINACT_PWRCON_BUMAIN, emuPower_MainBU = EMU_BUINACT_PWRCON_MAINBU, emuPower_NoDiode = EMU_BUINACT_PWRCON_NODIODE } |
enum | EMU_PowerConfig_TypeDef { emuPowerConfig_DcdcToDvdd } |
enum |
EMU_Probe_TypeDef
{
emuProbe_Disable = EMU_BUCTRL_PROBE_DISABLE, emuProbe_VDDDReg = EMU_BUCTRL_PROBE_VDDDREG, emuProbe_BUIN = EMU_BUCTRL_PROBE_BUIN, emuProbe_BUOUT = EMU_BUCTRL_PROBE_BUOUT } |
enum |
EMU_Resistor_TypeDef
{
emuRes_Res0 = EMU_PWRCONF_PWRRES_RES0, emuRes_Res1 = EMU_PWRCONF_PWRRES_RES1, emuRes_Res2 = EMU_PWRCONF_PWRRES_RES2, emuRes_Res3 = EMU_PWRCONF_PWRRES_RES3 } |
Functions |
|
void | EMU_BUPDInit (const EMU_BUPDInit_TypeDef *bupdInit) |
Configure Backup Power Domain settings.
|
|
__STATIC_INLINE void | EMU_BUPinEnable (bool enable) |
Disable BU_VIN support.
|
|
__STATIC_INLINE void | EMU_BUReady (void) |
Halts until backup power functionality is ready.
|
|
void | EMU_BUThresholdSet ( EMU_BODMode_TypeDef mode, uint32_t value) |
Configure Backup Power Domain BOD Threshold value.
|
|
void | EMU_BUThresRangeSet ( EMU_BODMode_TypeDef mode, uint32_t value) |
Configure Backup Power Domain BOD Threshold Range.
|
|
void | EMU_DCDCConductionModeSet (EMU_DcdcConductionMode_TypeDef conductionMode, bool rcoDefaultSet) |
Set DCDC LN regulator conduction mode.
|
|
bool | EMU_DCDCInit (const EMU_DCDCInit_TypeDef *dcdcInit) |
Configure DCDC regulator.
|
|
void | EMU_DCDCLnRcoBandSet (EMU_DcdcLnRcoBand_TypeDef band) |
Set DCDC Low-noise RCO band.
|
|
void | EMU_DCDCModeSet (EMU_DcdcMode_TypeDef dcdcMode) |
Set DCDC regulator operating mode.
|
|
void | EMU_DCDCOptimizeSlice (uint32_t em0LoadCurrentmA) |
Optimize DCDC slice count based on the estimated average load current in EM0.
|
|
bool | EMU_DCDCOutputVoltageSet (uint32_t mV, bool setLpVoltage, bool setLnVoltage) |
Set DCDC output voltage.
|
|
bool | EMU_DCDCPowerOff (void) |
Power off the DCDC regulator.
|
|
void | EMU_EM23Init (const EMU_EM23Init_TypeDef *em23Init) |
Update EMU module with Energy Mode 2 and 3 configuration.
|
|
__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.
|
|
__STATIC_INLINE void | EMU_EM4Lock (bool enable) |
Enable or disable EM4 lock configuration.
|
|
__STATIC_INLINE void | EMU_EnterEM1 (void) |
Enter energy mode 1 (EM1).
|
|
void | EMU_EnterEM2 (bool restore) |
Enter energy mode 2 (EM2).
|
|
void | EMU_EnterEM3 (bool restore) |
Enter energy mode 3 (EM3).
|
|
void | EMU_EnterEM4 (void) |
Enter energy mode 4 (EM4).
|
|
__STATIC_INLINE void | EMU_IntClear (uint32_t flags) |
Clear one or more pending EMU interrupts.
|
|
__STATIC_INLINE void | EMU_IntDisable (uint32_t flags) |
Disable one or more EMU interrupts.
|
|
__STATIC_INLINE void | EMU_IntEnable (uint32_t flags) |
Enable one or more EMU interrupts.
|
|
__STATIC_INLINE uint32_t | EMU_IntGet (void) |
Get pending EMU interrupt flags.
|
|
__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.
|
|
__STATIC_INLINE void | EMU_IntSet (uint32_t flags) |
Set one or more pending EMU interrupts.
|
|
__STATIC_INLINE void | EMU_Lock (void) |
Lock the EMU in order to protect its registers against unintended modification.
|
|
void | EMU_MemPwrDown (uint32_t blocks) |
Power down memory block.
|
|
void | EMU_RamPowerDown (uint32_t start, uint32_t end) |
Power down RAM memory blocks.
|
|
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.
|
|
void | EMU_Save (void) |
Save CMU HF clock select state, oscillator enable and voltage scaling (if available) before
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 state to be saved without going to sleep. The state can be restored manually by calling
EMU_Restore()
.
|
|
__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.
|
|
Macro Definition Documentation
#define EMU_BUPDINIT_DEFAULT |
Default Backup Power Domain configuration
Definition at line
553
of file
em_emu.h
.
#define EMU_EM23INIT_DEFAULT |
Default initialization of EM2 and 3 configuration
Definition at line
458
of file
em_emu.h
.
Referenced by BSP_initEmu() .
#define EMU_EM4INIT_DEFAULT |
Default initialization of EM4 configuration (Series 0)
Definition at line
490
of file
em_emu.h
.
Referenced by UTIL_shutdown() .
Enumeration Type Documentation
enum EMU_BODMode_TypeDef |
enum EMU_EM4Osc_TypeDef |
enum EMU_Power_TypeDef |
Backup Power Domain power connection
Definition at line
102
of file
em_emu.h
.
enum EMU_Probe_TypeDef |
enum EMU_Resistor_TypeDef |
Backup Power Domain resistor selection
Definition at line
88
of file
em_emu.h
.
Function Documentation
void EMU_BUPDInit | ( | const EMU_BUPDInit_TypeDef * |
bupdInit
|
) |
Configure Backup Power Domain settings.
- Parameters
-
[in] bupdInit
Backup power domain initialization structure
Definition at line
1245
of file
em_emu.c
.
References _EMU_BUACT_PWRCON_MASK , _EMU_BUCTRL_BODCAL_MASK , _EMU_BUCTRL_BODCAL_SHIFT , _EMU_BUCTRL_EN_MASK , _EMU_BUCTRL_EN_SHIFT , _EMU_BUCTRL_PROBE_MASK , _EMU_BUCTRL_STATEN_MASK , _EMU_BUCTRL_STATEN_SHIFT , _EMU_BUINACT_PWRCON_MASK , _EMU_PWRCONF_PWRRES_MASK , _EMU_PWRCONF_VOUTMED_MASK , _EMU_PWRCONF_VOUTMED_SHIFT , _EMU_PWRCONF_VOUTSTRONG_MASK , _EMU_PWRCONF_VOUTSTRONG_SHIFT , _EMU_PWRCONF_VOUTWEAK_MASK , _EMU_PWRCONF_VOUTWEAK_SHIFT , _RMU_CTRL_BURSTEN_SHIFT , EMU_BUPDInit_TypeDef::activePower , EMU_BUPDInit_TypeDef::bodCal , BUS_RegBitWrite() , EMU , EMU_BUPinEnable() , EMU_BUPDInit_TypeDef::enable , EMU_BUPDInit_TypeDef::inactivePower , EMU_BUPDInit_TypeDef::probe , EMU_BUPDInit_TypeDef::resistor , RMU , EMU_BUPDInit_TypeDef::statusPinEnable , EMU_BUPDInit_TypeDef::voutMed , EMU_BUPDInit_TypeDef::voutStrong , and EMU_BUPDInit_TypeDef::voutWeak .
__STATIC_INLINE void EMU_BUPinEnable | ( | bool |
enable
|
) |
Disable BU_VIN support.
- Parameters
-
[in] enable
If true, enables BU_VIN input pin support, if false disables it
Definition at line
943
of file
em_emu.h
.
References _EMU_ROUTE_BUVINPEN_SHIFT , BUS_RegBitWrite() , and EMU .
Referenced by EMU_BUPDInit() .
void EMU_BUThresholdSet | ( | EMU_BODMode_TypeDef |
mode,
|
uint32_t |
value
|
||
) |
Configure Backup Power Domain BOD Threshold value.
- Note
- These values are precalibrated
- Parameters
-
[in] mode
Active or Inactive mode [in] value
Definition at line
1303
of file
em_emu.c
.
References _EMU_BUACT_BUEXTHRES_MASK , _EMU_BUACT_BUEXTHRES_SHIFT , _EMU_BUINACT_BUENTHRES_MASK , _EMU_BUINACT_BUENTHRES_SHIFT , EMU , emuBODMode_Active , and emuBODMode_Inactive .
void EMU_BUThresRangeSet | ( | EMU_BODMode_TypeDef |
mode,
|
uint32_t |
value
|
||
) |
Configure Backup Power Domain BOD Threshold Range.
- Note
- These values are precalibrated
- Parameters
-
[in] mode
Active or Inactive mode [in] value
Definition at line
1328
of file
em_emu.c
.
References _EMU_BUACT_BUEXRANGE_MASK , _EMU_BUACT_BUEXRANGE_SHIFT , _EMU_BUINACT_BUENRANGE_MASK , _EMU_BUINACT_BUENRANGE_SHIFT , EMU , emuBODMode_Active , and emuBODMode_Inactive .
void EMU_DCDCConductionModeSet | ( | EMU_DcdcConductionMode_TypeDef |
conductionMode,
|
bool |
rcoDefaultSet
|
||
) |
Set DCDC LN regulator conduction mode.
- Parameters
-
[in] conductionMode
DCDC LN conduction mode. [in] rcoDefaultSet
The default DCDC RCO band for the conductionMode will be used if true. Otherwise the current RCO configuration is used.
Definition at line
1887
of file
em_emu.c
.
References EMU , EMU_DCDCLnRcoBandSet() , EMU_DCDCModeSet() , EMU_DCDCOptimizeSlice() , EMU_IntClear() , and EMU_IntGet() .
bool EMU_DCDCInit | ( | const EMU_DCDCInit_TypeDef * |
dcdcInit
|
) |
Configure DCDC regulator.
- Note
- Do not call this function if the power circuit is configured for NODCDC as described in the Power Configurations section of the Reference Manual. Instead call EMU_DCDCPowerOff() .
- Parameters
-
[in] dcdcInit
DCDC initialization structure
- Returns
- True if initialization parameters are valid
Definition at line
1941
of file
em_emu.c
.
References BUS_RegBitWrite() , EMU , EMU_DCDCModeSet() , EMU_DCDCOptimizeSlice() , and EMU_DCDCOutputVoltageSet() .
void EMU_DCDCLnRcoBandSet | ( | EMU_DcdcLnRcoBand_TypeDef |
band
|
) |
Set DCDC Low-noise RCO band.
- Parameters
-
[in] band
RCO band to set.
Definition at line
2295
of file
em_emu.c
.
References BUS_RegBitRead() , EMU , and EMU_DCDCOptimizeSlice() .
Referenced by EMU_DCDCConductionModeSet() .
void EMU_DCDCModeSet | ( | EMU_DcdcMode_TypeDef |
dcdcMode
|
) |
Set DCDC regulator operating mode.
- Parameters
-
[in] dcdcMode
DCDC mode
Definition at line
1815
of file
em_emu.c
.
References BUS_RegBitWrite() , EMU , EMU_IntClear() , and EMU_IntGet() .
Referenced by EMU_DCDCConductionModeSet() , EMU_DCDCInit() , and EMU_EnterEM4() .
void EMU_DCDCOptimizeSlice | ( | uint32_t |
em0LoadCurrentmA
|
) |
Optimize DCDC slice count based on the estimated average load current in EM0.
- Parameters
-
[in] em0LoadCurrent_mA
Estimated average EM0 load current in mA.
Definition at line
2236
of file
em_emu.c
.
References EMU .
Referenced by EMU_DCDCConductionModeSet() , EMU_DCDCInit() , and EMU_DCDCLnRcoBandSet() .
bool EMU_DCDCOutputVoltageSet | ( | uint32_t |
mV,
|
bool |
setLpVoltage,
|
||
bool |
setLnVoltage
|
||
) |
Set DCDC output voltage.
- Parameters
-
[in] mV
Target DCDC output voltage in mV
- Returns
- True if the mV parameter is valid
Definition at line
2085
of file
em_emu.c
.
References DEVINFO , EMU , SL_MAX , and SL_MIN .
Referenced by EMU_DCDCInit() .
bool EMU_DCDCPowerOff | ( | void |
|
) |
Power off the DCDC regulator.
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
2324
of file
em_emu.c
.
References EMU .
void EMU_EM23Init | ( | const EMU_EM23Init_TypeDef * |
em23Init
|
) |
Update EMU module with Energy Mode 2 and 3 configuration.
- Parameters
-
[in] em23Init
Energy Mode 2 and 3 configuration structure
Definition at line
1160
of file
em_emu.c
.
References EMU_EM23Init_TypeDef::em23VregFullEn , EMU , and EMU_CTRL_EMVREG .
Referenced by BSP_initEmu() .
void EMU_EM4Init | ( | const EMU_EM4Init_TypeDef * |
em4Init
|
) |
Update EMU module with Energy Mode 4 configuration.
- Parameters
-
[in] em4Init
Energy Mode 4 configuration structure
Definition at line
1186
of file
em_emu.c
.
References _EMU_EM4CONF_BUBODRSTDIS_MASK , _EMU_EM4CONF_BUBODRSTDIS_SHIFT , _EMU_EM4CONF_BURTCWU_MASK , _EMU_EM4CONF_BURTCWU_SHIFT , _EMU_EM4CONF_LOCKCONF_MASK , _EMU_EM4CONF_LOCKCONF_SHIFT , _EMU_EM4CONF_OSC_MASK , _EMU_EM4CONF_VREGEN_MASK , _EMU_EM4CONF_VREGEN_SHIFT , EMU_EM4Init_TypeDef::buBodRstDis , EMU_EM4Init_TypeDef::buRtcWakeup , EMU , EMU_EM4Init_TypeDef::lockConfig , EMU_EM4Init_TypeDef::osc , and EMU_EM4Init_TypeDef::vreg .
Referenced by UTIL_shutdown() .
__STATIC_INLINE void EMU_EM4Lock | ( | bool |
enable
|
) |
Enable or disable EM4 lock configuration.
- Parameters
-
[in] enable
If true, locks down EM4 configuration
Definition at line
918
of file
em_emu.h
.
References _EMU_EM4CONF_LOCKCONF_SHIFT , BUS_RegBitWrite() , and EMU .
void EMU_EnterEM2 | ( | bool |
restore
|
) |
Enter energy mode 2 (EM2).
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 ERRATA_FIX_EMU_E110_ENABLE is active, the core's SLEEPONEXIT feature can not be used.
- 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.
- If voltage scaling is supported, the restore parameter is true and the EM0 voltage scaling level is set higher than the EM2 level, then the EM0 level is also restored.
- Parameters
-
[in] restore
- true - save and restore oscillators, clocks and voltage scaling, see function details.
- false - do not save and 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
522
of file
em_emu.c
.
References CORE_CRITICAL_SECTION , and SystemCoreClockUpdate() .
Referenced by CAPLESENSE_Sleep() , UTIL_sleep() , and UTIL_waitForEvent() .
void EMU_EnterEM3 | ( | bool |
restore
|
) |
Enter energy mode 3 (EM3).
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 ERRATA_FIX_EMU_E110_ENABLE is active, the core's SLEEPONEXIT feature can not be used.
- 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.
- If voltage scaling is supported, the restore parameter is true and the EM0 voltage scaling level is set higher than the EM3 level, then the EM0 level is also restored.
- Parameters
-
[in] restore
- true - save and restore oscillators, clocks and voltage scaling, see function details.
- false - do not save and 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
644
of file
em_emu.c
.
References CMU , CMU_Lock() , CMU_LOCK_LOCKKEY_LOCKED , CMU_OSCENCMD_LFRCODIS , CMU_OSCENCMD_LFXODIS , CMU_Unlock() , CORE_CRITICAL_SECTION , and SystemCoreClockUpdate() .
void EMU_EnterEM4 | ( | void |
|
) |
Enter energy mode 4 (EM4).
- Note
- Only a power on reset or external reset pin can wake the device from EM4.
Definition at line
765
of file
em_emu.c
.
References _EMU_CTRL_EM4CTRL_MASK , _EMU_CTRL_EM4CTRL_SHIFT , BUS_RegMaskedClear() , CMU , CMU_OSCENCMD_HFRCOEN , CMU_STATUS_HFRCORDY , DEVINFO , EMU , EMU_BASE , EMU_DCDCModeSet() , and EMU_Unlock() .
Referenced by UTIL_shutdown() .
__STATIC_INLINE void EMU_IntClear | ( | uint32_t |
flags
|
) |
Clear one or more pending EMU interrupts.
- Parameters
-
[in] flags
Pending EMU interrupt sources to clear. Use one or more valid interrupt flags for the EMU module (EMU_IFC_nnn).
Definition at line
823
of file
em_emu.h
.
References EMU .
Referenced by disableInterrupts() , EMU_DCDCConductionModeSet() , EMU_DCDCModeSet() , and TEMPDRV_IRQHandler() .
__STATIC_INLINE void EMU_IntDisable | ( | uint32_t |
flags
|
) |
Disable one or more EMU interrupts.
- Parameters
-
[in] flags
EMU interrupt sources to disable. Use one or more valid interrupt flags for the EMU module (EMU_IEN_nnn).
Definition at line
836
of file
em_emu.h
.
References EMU .
Referenced by disableInterrupts() , and updateInterrupts() .
__STATIC_INLINE void EMU_IntEnable | ( | uint32_t |
flags
|
) |
Enable one or more EMU interrupts.
- 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] flags
EMU interrupt sources to enable. Use one or more valid interrupt flags for the EMU module (EMU_IEN_nnn).
Definition at line
854
of file
em_emu.h
.
References EMU .
Referenced by updateInterrupts() .
__STATIC_INLINE uint32_t EMU_IntGet | ( | void |
|
) |
Get pending EMU interrupt flags.
- 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
870
of file
em_emu.h
.
References EMU .
Referenced by EMU_DCDCConductionModeSet() , and EMU_DCDCModeSet() .
__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.
- 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
889
of file
em_emu.h
.
References EMU .
Referenced by TEMPDRV_IRQHandler() .
__STATIC_INLINE void EMU_IntSet | ( | uint32_t |
flags
|
) |
Set one or more pending EMU interrupts.
- Parameters
-
[in] flags
EMU interrupt sources to set to pending. Use one or more valid interrupt flags for the EMU module (EMU_IFS_nnn).
Definition at line
905
of file
em_emu.h
.
References EMU .
__STATIC_INLINE void EMU_Lock | ( | void |
|
) |
Lock the EMU in order to protect its registers against unintended modification.
- 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
961
of file
em_emu.h
.
References EMU , and EMU_LOCK_LOCKKEY_LOCK .
Referenced by RMU_ResetCauseClear() .
void EMU_MemPwrDown | ( | uint32_t |
blocks
|
) |
Power down memory block.
- Parameters
-
[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.
- Note
- Only a POR reset can power up the specified memory block(s) after powerdown.
-
Deprecated:
- This function is deprecated, use EMU_RamPowerDown() instead which maps a user provided memory range into RAM blocks to power down.
Definition at line
903
of file
em_emu.c
.
References EMU .
void EMU_RamPowerDown | ( | uint32_t |
start,
|
uint32_t |
end
|
||
) |
Power down RAM memory blocks.
This function will power down all the RAM blocks that are within a given range. The RAM block layout is different between device families, so this function can be used in a generic way to power down a RAM memory region which is known to be unused.
This function will only power down blocks which are completely enclosed by the memory range given by [start, end).
Here is an example of how to power down all RAM blocks except the first one. The first RAM block is special in that it cannot be powered down by the hardware. The size of this first RAM block is device specific see the reference manual to find the RAM block sizes.
- Note
- Only a POR reset can power up the specified memory block(s) after powerdown.
- Parameters
-
[in] start
The start address of the RAM region to power down. This address is inclusive. [in] end
The end address of the RAM region to power down. This address is exclusive. If this parameter is 0, then all RAM blocks contained in the region from start to the upper RAM address will be powered down.
Definition at line
948
of file
em_emu.c
.
References EMU , RAM_MEM_BASE , SRAM_BASE , and SRAM_SIZE .
void EMU_UpdateOscConfig | ( | void |
|
) |
Update EMU module with CMU oscillator selection/enable status.
-
Deprecated:
- Oscillator status is saved in EMU_EnterEM2() and EMU_EnterEM3() .
Definition at line
1041
of file
em_emu.c
.