EMU - Energy Management Unit#

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.

Modules#

EMU_EM23Init_TypeDef

EMU_EM4Init_TypeDef

EMU_BUPDInit_TypeDef

Enumerations#

enum
emuEM4Osc_ULFRCO = EMU_EM4CONF_OSC_ULFRCO
emuEM4Osc_LFXO = EMU_EM4CONF_OSC_LFXO
emuEM4Osc_LFRCO = EMU_EM4CONF_OSC_LFRCO
}

EM4 duty oscillator.

enum
emuProbe_Disable = EMU_BUCTRL_PROBE_DISABLE
emuProbe_VDDDReg = EMU_BUCTRL_PROBE_VDDDREG
emuProbe_BUIN = EMU_BUCTRL_PROBE_BUIN
emuProbe_BUOUT = EMU_BUCTRL_PROBE_BUOUT
}

Backup Power Voltage Probe types.

enum
emuRes_Res0 = EMU_PWRCONF_PWRRES_RES0
emuRes_Res1 = EMU_PWRCONF_PWRRES_RES1
emuRes_Res2 = EMU_PWRCONF_PWRRES_RES2
emuRes_Res3 = EMU_PWRCONF_PWRRES_RES3
}

Backup Power Domain resistor selection.

enum
emuPower_None = EMU_BUINACT_PWRCON_NONE
emuPower_BUMain = EMU_BUINACT_PWRCON_BUMAIN
emuPower_MainBU = EMU_BUINACT_PWRCON_MAINBU
emuPower_NoDiode = EMU_BUINACT_PWRCON_NODIODE
}

Backup Power Domain power connection.

enum
emuBODMode_Active
emuBODMode_Inactive
}

BOD threshold setting selector, active or inactive mode.

enum
emuEM4Shutoff = 0
emuEM4Hibernate = 1
}

EM4 modes.

enum
emuPowerConfig_DcdcToDvdd
}

Power configurations.

Functions#

void
EMU_EM23Init(const EMU_EM23Init_TypeDef *em23Init)

Update the EMU module with Energy Mode 2 and 3 configuration.

void

Energy mode 2/3 pre-sleep hook function.

void

Energy mode 2/3 post-sleep hook function.

void

EFP's Energy mode 2/3 pre-sleep hook function.

void

EFP's Energy mode 2/3 post-sleep hook function.

void
EMU_EnterEM2(bool restore)

Enter energy mode 2 (EM2).

void
EMU_EnterEM3(bool restore)

Enter energy mode 3 (EM3).

void
EMU_Save(void)

Save the 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.

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.

void
EMU_EM4Init(const EMU_EM4Init_TypeDef *em4Init)

Update the EMU module with Energy Mode 4 configuration.

void

Energy mode 4 pre-sleep hook function.

void

EFP's Energy mode 4 pre-sleep hook function.

void

Enter energy mode 4 (EM4).

void

Enter energy mode 4 (EM4).

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

Power up all available RAM memory blocks.

void

Update EMU module with CMU oscillator selection/enable status.

void
EMU_BUPDInit(const EMU_BUPDInit_TypeDef *bupdInit)

Configure Backup Power Domain settings.

void
EMU_BUThresholdSet(EMU_BODMode_TypeDef mode, uint32_t value)

Configure the Backup Power Domain BOD Threshold value.

void
EMU_BUThresRangeSet(EMU_BODMode_TypeDef mode, uint32_t value)

Configure the Backup Power Domain BOD Threshold Range.

void
EMU_BUStatEnSet(bool enable)

Enable backup mode status export.

void
EMU_BUEnableSet(bool enable)

Enable backup mode.

void

Enter energy mode 1 (EM1).

void
EMU_IntClear(uint32_t flags)

Clear one or more pending EMU interrupts.

void
EMU_IntDisable(uint32_t flags)

Disable one or more EMU interrupts.

void
EMU_IntEnable(uint32_t flags)

Enable one or more EMU interrupts.

uint32_t

Get pending EMU interrupt flags.

uint32_t

Get enabled and pending EMU interrupt flags.

void
EMU_IntSet(uint32_t flags)

Set one or more pending EMU interrupts.

void
EMU_EM4Lock(bool enable)

Enable or disable EM4 lock configuration.

void

Halts until backup power functionality is ready.

void
EMU_BUPinEnable(bool enable)

Disable BU_VIN support.

void
EMU_Lock(void)

Lock EMU registers in order to protect them against unintended modification.

void

Unlock the EMU so that writing to locked registers again is possible.

void

Block entering EM2 or higher number energy modes.

void

Unblock entering EM2 or higher number energy modes.

Macros#

#define

Default initialization of EM2 and 3 configuration.

#define

Default initialization of EM4 configuration (Series 0).

#define

Default Backup Power Domain configuration.

Enumeration Documentation#

EMU_EM4Osc_TypeDef#

EMU_EM4Osc_TypeDef

EM4 duty oscillator.

Enumerator
emuEM4Osc_ULFRCO

Select ULFRCO as duty oscillator in EM4.

emuEM4Osc_LFXO

Select LFXO as duty oscillator in EM4.

emuEM4Osc_LFRCO

Select LFRCO as duty oscillator in EM4.


Definition at line 90 of file platform/emlib/inc/em_emu.h

EMU_Probe_TypeDef#

EMU_Probe_TypeDef

Backup Power Voltage Probe types.

Enumerator
emuProbe_Disable

Disable voltage probe.

emuProbe_VDDDReg

Connect probe to VDD_DREG.

emuProbe_BUIN

Connect probe to BU_IN.

emuProbe_BUOUT

Connect probe to BU_OUT.


Definition at line 102 of file platform/emlib/inc/em_emu.h

EMU_Resistor_TypeDef#

EMU_Resistor_TypeDef

Backup Power Domain resistor selection.

Enumerator
emuRes_Res0

Main power and backup power connected with RES0 series resistance.

emuRes_Res1

Main power and backup power connected with RES1 series resistance.

emuRes_Res2

Main power and backup power connected with RES2 series resistance.

emuRes_Res3

Main power and backup power connected with RES3 series resistance.


Definition at line 116 of file platform/emlib/inc/em_emu.h

EMU_Power_TypeDef#

EMU_Power_TypeDef

Backup Power Domain power connection.

Enumerator
emuPower_None

No connection between main and backup power.

emuPower_BUMain

Main power and backup power connected through diode, allowing current from backup to main only.

emuPower_MainBU

Main power and backup power connected through diode, allowing current from main to backup only.

emuPower_NoDiode

Main power and backup power connected without diode.


Definition at line 130 of file platform/emlib/inc/em_emu.h

EMU_BODMode_TypeDef#

EMU_BODMode_TypeDef

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 201 of file platform/emlib/inc/em_emu.h

EMU_EM4State_TypeDef#

EMU_EM4State_TypeDef

EM4 modes.

Enumerator
emuEM4Shutoff

EM4 Shutoff.

emuEM4Hibernate

EM4 Hibernate.


Definition at line 209 of file platform/emlib/inc/em_emu.h

EMU_PowerConfig_TypeDef#

EMU_PowerConfig_TypeDef

Power configurations.

DCDC-to-DVDD is currently the only supported mode.

Enumerator
emuPowerConfig_DcdcToDvdd

DCDC is connected to DVDD.


Definition at line 230 of file platform/emlib/inc/em_emu.h

Function Documentation#

EMU_EM23Init#

void EMU_EM23Init (const EMU_EM23Init_TypeDef * em23Init)

Update the EMU module with Energy Mode 2 and 3 configuration.

Parameters
[in]em23Init

Energy Mode 2 and 3 configuration structure.


Definition at line 798 of file platform/emlib/src/em_emu.c

EMU_EM23PresleepHook#

void EMU_EM23PresleepHook (void )

Energy mode 2/3 pre-sleep hook function.

Parameters
N/A

This function is called by EMU_EnterEM2() and EMU_EnterEM3() functions just prior to execution of the WFI instruction. The function implementation does not perform anything, but it is SL_WEAK so that it can be re- implemented in application code if actions are needed.


Definition at line 832 of file platform/emlib/src/em_emu.c

EMU_EM23PostsleepHook#

void EMU_EM23PostsleepHook (void )

Energy mode 2/3 post-sleep hook function.

Parameters
N/A

This function is called by EMU_EnterEM2() and EMU_EnterEM3() functions just after wakeup from the WFI instruction. The function implementation does not perform anything, but it is SL_WEAK so that it can be re- implemented in application code if actions are needed.


Definition at line 864 of file platform/emlib/src/em_emu.c

EMU_EFPEM23PresleepHook#

void EMU_EFPEM23PresleepHook (void )

EFP's Energy mode 2/3 pre-sleep hook function.

Parameters
N/A

This function is similar to EMU_EM23PresleepHook() but is reserved for EFP usage.

Note

  • The function is primarily meant to be used in systems with EFP circuitry. (EFP = Energy Friendly Pmic (PMIC = Power Management IC)). In such systems there is a need to drive certain signals to EFP pins to notify about energy mode transitions.


Definition at line 850 of file platform/emlib/src/em_emu.c

EMU_EFPEM23PostsleepHook#

void EMU_EFPEM23PostsleepHook (void )

EFP's Energy mode 2/3 post-sleep hook function.

Parameters
N/A

This function is similar to EMU_EM23PostsleepHook() but is reserved for EFP usage.

Note

  • The function is primarily meant to be used in systems with EFP circuitry. (EFP = Energy Friendly Pmic (PMIC = Power Management IC)). In such systems there is a need to drive certain signals to EFP pins to notify about energy mode transitions.


Definition at line 882 of file platform/emlib/src/em_emu.c

EMU_EnterEM2#

void EMU_EnterEM2 (bool restore)

Enter energy mode 2 (EM2).

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.

When entering EM2, high-frequency clocks are disabled, i.e., 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.

  • This function is incompatible with the Power Manager module. When the Power Manager module is present, it must be the one deciding at which EM level the device sleeps to ensure the application properly works. Using both at the same time could lead to undefined behavior in the application.

  • 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 automatic starting and selecting of the core clocks will be done, regardless 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.

  • On Series 2 Config 2 devices (EFRxG22), this function will also relock the DPLL if the DPLL is used and restore is true.

Note that the hardware will automatically update the HFRCO frequency in the case where voltage scaling is used in EM2/EM3 and not in EM0/EM1. When the restore argument to this function is true then software will restore the original HFRCO frequency after EM2/EM3 wake up. If the restore argument is false then the HFRCO frequency is 19 MHz when coming out of EM2/EM3 and all wait states are at a safe value.

  • The restore option should only be used if all clock control is done via the CMU API.


Definition at line 956 of file platform/emlib/src/em_emu.c

EMU_EnterEM3#

void EMU_EnterEM3 (bool restore)

Enter energy mode 3 (EM3).

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.

When entering EM3, the high-frequency clocks are disabled by hardware, i.e., HFXO, HFRCO, and AUXHFRCO (for AUXHFRCO, see exception note below). In addition, the low-frequency clocks, i.e., LFXO and LFRCO are disabled by software. 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 an oscillator other 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 software. However, since it is handled by software, 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. This 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't be used.

  • This function is incompatible with the Power Manager module. When the Power Manager module is present, it must be the one deciding at which EM level the device sleeps to ensure the application properly works. Using both at the same time could lead to undefined behavior in the application.

  • 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, therefore, 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.

  • On Series 2 Config 2 devices (EFRxG22), this function will also relock the DPLL if the DPLL is used and restore is true.

  • The restore option should only be used if all clock control is done via the CMU API.


Definition at line 1143 of file platform/emlib/src/em_emu.c

EMU_Save#

void EMU_Save (void )

Save the 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.

Parameters
N/A

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().


Definition at line 1293 of file platform/emlib/src/em_emu.c

EMU_Restore#

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.

Parameters
N/A

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.


Definition at line 1312 of file platform/emlib/src/em_emu.c

EMU_EM4Init#

void EMU_EM4Init (const EMU_EM4Init_TypeDef * em4Init)

Update the EMU module with Energy Mode 4 configuration.

Parameters
[in]em4Init

Energy Mode 4 configuration structure.


Definition at line 1330 of file platform/emlib/src/em_emu.c

EMU_EM4PresleepHook#

void EMU_EM4PresleepHook (void )

Energy mode 4 pre-sleep hook function.

Parameters
N/A

This function is called by EMU_EnterEM4() just prior to the sequence of writes to put the device in EM4. The function implementation does not perform anything, but it is SL_WEAK so that it can be re-implemented in application code if actions are needed.


Definition at line 1394 of file platform/emlib/src/em_emu.c

EMU_EFPEM4PresleepHook#

void EMU_EFPEM4PresleepHook (void )

EFP's Energy mode 4 pre-sleep hook function.

Parameters
N/A

This function is similar to EMU_EM4PresleepHook() but is reserved for EFP usage.

Note

  • The function is primarily meant to be used in systems with EFP circuitry. (EFP = Energy Friendly Pmic (PMIC = Power Management IC)). In such systems there is a need to drive certain signals to EFP pins to notify about energy mode transitions.


Definition at line 1412 of file platform/emlib/src/em_emu.c

EMU_EnterEM4#

void EMU_EnterEM4 (void )

Enter energy mode 4 (EM4).

Parameters
N/A

Note

  • Only a power on reset or external reset pin can wake the device from EM4.


Definition at line 1423 of file platform/emlib/src/em_emu.c

EMU_EnterEM4Wait#

void EMU_EnterEM4Wait (void )

Enter energy mode 4 (EM4).

Parameters
N/A

This function waits after the EM4 entry request to make sure the CPU is properly shutdown or the EM4 entry failed.

Note

  • Only a power on reset or external reset pin can wake the device from EM4.


Definition at line 1553 of file platform/emlib/src/em_emu.c

EMU_MemPwrDown#

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, and so on. Memory block 0 cannot be disabled. See the reference manual for available memory blocks for a device.

Note

  • Only a POR reset can power up the specified memory block(s) after power down.


Definition at line 1615 of file platform/emlib/src/em_emu.c

EMU_RamPowerDown#

void EMU_RamPowerDown (uint32_t start, uint32_t end)

Power down RAM memory blocks.

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, all RAM blocks contained in the region from start to the upper RAM address will be powered down.

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).

This is an example 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 the first RAM block is device-specific. See the reference manual to find the RAM block sizes.

EMU_RamPowerDown(SRAM_BASE, SRAM_BASE + SRAM_SIZE);

Note

  • Only a reset can power up the specified memory block(s) after power down on a series 0 device. The specified memory block(s) will stay off until a call to EMU_RamPowerUp() is done on series 1/2.


Definition at line 1662 of file platform/emlib/src/em_emu.c

EMU_RamPowerUp#

void EMU_RamPowerUp (void )

Power up all available RAM memory blocks.

Parameters
N/A

This function will power up all the RAM blocks on a device, this means that the RAM blocks are retained in EM2/EM3. Note that this functionality is not supported on Series 0 devices. Only a reset will power up the RAM blocks on a series 0 device.


Definition at line 1753 of file platform/emlib/src/em_emu.c

EMU_UpdateOscConfig#

void EMU_UpdateOscConfig (void )

Update EMU module with CMU oscillator selection/enable status.

Parameters
N/A

Definition at line 1803 of file platform/emlib/src/em_emu.c

EMU_BUPDInit#

void EMU_BUPDInit (const EMU_BUPDInit_TypeDef * bupdInit)

Configure Backup Power Domain settings.

Parameters
[in]bupdInit

Backup power domain initialization structure.


Definition at line 1975 of file platform/emlib/src/em_emu.c

EMU_BUThresholdSet#

void EMU_BUThresholdSet (EMU_BODMode_TypeDef mode, uint32_t value)

Configure the Backup Power Domain BOD Threshold value.

Parameters
[in]mode

Active or Inactive mode

[in]value

Note

  • These values are precalibrated.


Definition at line 2033 of file platform/emlib/src/em_emu.c

EMU_BUThresRangeSet#

void EMU_BUThresRangeSet (EMU_BODMode_TypeDef mode, uint32_t value)

Configure the Backup Power Domain BOD Threshold Range.

Parameters
[in]mode

Active or Inactive mode

[in]value

Note

  • These values are precalibrated.


Definition at line 2058 of file platform/emlib/src/em_emu.c

EMU_BUStatEnSet#

void EMU_BUStatEnSet (bool enable)

Enable backup mode status export.

Parameters
[in]enable

True to enable status export. False to disable.


Definition at line 2217 of file platform/emlib/src/em_emu.c

EMU_BUEnableSet#

void EMU_BUEnableSet (bool enable)

Enable backup mode.

Parameters
[in]enable

True to enable backup mode. False to disable.


Definition at line 2235 of file platform/emlib/src/em_emu.c

EMU_EnterEM1#

void EMU_EnterEM1 (void )

Enter energy mode 1 (EM1).

Parameters
N/A

Note

  • This function is incompatible with the Power Manager module. When the Power Manager module is present, it must be the one deciding at which EM level the device sleeps to ensure the application properly works. Using both at the same time could lead to undefined behavior in the application.


Definition at line 1311 of file platform/emlib/inc/em_emu.h

EMU_IntClear#

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 or EMU_IF_nnn).


Definition at line 1378 of file platform/emlib/inc/em_emu.h

EMU_IntDisable#

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 1395 of file platform/emlib/inc/em_emu.h

EMU_IntEnable#

void EMU_IntEnable (uint32_t flags)

Enable one or more EMU interrupts.

Parameters
[in]flags

EMU interrupt sources to enable. Use one or more valid interrupt flags for the EMU module (EMU_IEN_nnn).

Note

  • Depending on the use, a pending interrupt may already be set prior to enabling the interrupt. To ignore a pending interrupt, consider using EMU_IntClear() prior to enabling the interrupt.


Definition at line 1417 of file platform/emlib/inc/em_emu.h

EMU_IntGet#

uint32_t EMU_IntGet (void )

Get pending EMU interrupt flags.

Parameters
N/A

Note

  • 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 1528 of file platform/emlib/inc/em_emu.h

EMU_IntGetEnabled#

uint32_t EMU_IntGetEnabled (void )

Get enabled and pending EMU interrupt flags.

Parameters
N/A

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 Return value is the bitwise AND of

    • the enabled interrupt sources in EMU_IEN and

    • the pending interrupt flags EMU_IF.


Definition at line 1547 of file platform/emlib/inc/em_emu.h

EMU_IntSet#

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 1563 of file platform/emlib/inc/em_emu.h

EMU_EM4Lock#

void EMU_EM4Lock (bool enable)

Enable or disable EM4 lock configuration.

Parameters
[in]enable

If true, locks down EM4 configuration.


Definition at line 1580 of file platform/emlib/inc/em_emu.h

EMU_BUReady#

void EMU_BUReady (void )

Halts until backup power functionality is ready.

Parameters
N/A

Definition at line 1591 of file platform/emlib/inc/em_emu.h

EMU_BUPinEnable#

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 1605 of file platform/emlib/inc/em_emu.h

EMU_Lock#

void EMU_Lock (void )

Lock EMU registers in order to protect them against unintended modification.

Parameters
N/A

Note

  • If locking 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 1623 of file platform/emlib/inc/em_emu.h

EMU_Unlock#

void EMU_Unlock (void )

Unlock the EMU so that writing to locked registers again is possible.

Parameters
N/A

Definition at line 1632 of file platform/emlib/inc/em_emu.h

EMU_EM2Block#

void EMU_EM2Block (void )

Block entering EM2 or higher number energy modes.

Parameters
N/A

Definition at line 1664 of file platform/emlib/inc/em_emu.h

EMU_EM2UnBlock#

void EMU_EM2UnBlock (void )

Unblock entering EM2 or higher number energy modes.

Parameters
N/A

Definition at line 1673 of file platform/emlib/inc/em_emu.h

Macro Definition Documentation#

EMU_EM23INIT_DEFAULT#

#define EMU_EM23INIT_DEFAULT
Value:
{ \
false, /* Reduced voltage regulator drive strength in EM2/3.*/ \
}

Default initialization of EM2 and 3 configuration.


Definition at line 740 of file platform/emlib/inc/em_emu.h

EMU_EM4INIT_DEFAULT#

#define EMU_EM4INIT_DEFAULT
Value:
{ \
false, /* Do not lock configuration after it's been set. */ \
false, /* No reset will be asserted due to BOD in EM4. */ \
emuEM4Osc_ULFRCO, /* Use default ULFRCO oscillator. */ \
true, /* Wake up on EM4 BURTC interrupt. */ \
true, /* Enable VREG. */ \
}

Default initialization of EM4 configuration (Series 0).


Definition at line 772 of file platform/emlib/inc/em_emu.h

EMU_BUPDINIT_DEFAULT#

#define EMU_BUPDINIT_DEFAULT
Value:
{ \
emuProbe_Disable, /* Do not enable voltage probe. */ \
false, /* Disable BOD calibration mode. */ \
false, /* Disable BU_STAT pin for backup mode indication. */ \
\
emuRes_Res0, /* RES0 series resistance between main and backup power. */ \
false, /* Do not enable strong switch. */ \
false, /* Do not enable medium switch. */ \
false, /* Do not enable weak switch. */ \
\
emuPower_None, /* No connection between main and backup power. (inactive mode) */ \
emuPower_None, /* No connection between main and backup power. (active mode) */ \
true /* Enable BUPD enter on BOD, enable BU_VIN pin, release BU reset. */ \
}

Default Backup Power Domain configuration.


Definition at line 835 of file platform/emlib/inc/em_emu.h