EFR32 Mighty Gecko 1 Software Documentation  efr32mg1-doc-5.1.2
em_emu.c 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.c.

#include <limits.h>
#include "em_emu.h"
#include "em_cmu.h"
#include "em_system.h"
#include "em_common.h"
#include "em_assert.h"

Go to the source code of this file.

Macros

#define CMU_ULFRCOCTRL   (*(volatile uint32_t *) (CMU_BASE + 0x03C))
 
#define DCDC_TRIM_MODES   ((uint8_t)dcdcTrimMode_LN + 1)
 
#define EMU_BIASCONF   (*(volatile uint32_t *) (EMU_BASE + 0x164))
 
#define EMU_BIASTESTCTRL   (*(volatile uint32_t *) (EMU_BASE + 0x19C))
 
#define EMU_TESTLOCK   (*(volatile uint32_t *) (EMU_BASE + 0x190))
 
#define PWRCFG_DCDCTODVDD_VMAX   3000
 
#define PWRCFG_DCDCTODVDD_VMIN   1800
 

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_EM23Init (const EMU_EM23Init_TypeDef *em23Init)
 Update EMU module with Energy Mode 2 and 3 configuration. More...
 
void EMU_EM4Init (const 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_EnterEM4H (void)
 Enter energy mode 4 hibernate (EM4H). More...
 
void EMU_EnterEM4S (void)
 Enter energy mode 4 shutoff (EM4S). 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.
 
void EMU_SetBiasMode (EMU_BiasMode_TypeDef mode)
 Adjust the bias refresh rate. More...
 
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...