EZR32 Wonder Gecko Software Documentation  ezr32wg-doc-5.1.2
em_emu.h File Reference

Detailed Description

Energy management unit (EMU) peripheral API.

Version
5.1.2

License

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:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

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.

#include "em_device.h"
#include <stdbool.h>
#include "em_bus.h"

Go to the source code of this file.

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. More...
 
__STATIC_INLINE void EMU_BUPinEnable (bool enable)
 Disable BU_VIN support. More...
 
__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. More...
 
void EMU_BUThresRangeSet (EMU_BODMode_TypeDef mode, uint32_t value)
 Configure Backup Power Domain BOD Threshold Range. 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_EM4Lock (bool enable)
 Enable or disable EM4 lock 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...
 
__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_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_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...