EFR32 Mighty Gecko 1 Software Documentation  efr32mg1-doc-5.1.2

Detailed Description

Reset Management Unit (RMU) Peripheral API.

This module contains functions to control the RMU peripheral of Silicon Labs 32-bit MCUs and SoCs. The RMU ensures correct reset operation. It is responsible for connecting the different reset sources to the reset lines of the MCU or SoC.

Macros

#define RMU_LockupResetDisable(A)   RMU_ResetControl(rmuResetLockUp, A)
 

Enumerations

enum  RMU_Reset_TypeDef {
  rmuResetLockUp = _RMU_CTRL_LOCKUPRMODE_MASK,
  rmuResetWdog = _RMU_CTRL_WDOGRMODE_MASK,
  rmuResetCoreLockup = _RMU_CTRL_LOCKUPRMODE_MASK,
  rmuResetSys = _RMU_CTRL_SYSRMODE_MASK,
  rmuResetPin = _RMU_CTRL_PINRMODE_MASK
}
 
enum  RMU_ResetMode_TypeDef {
  rmuResetModeDisabled = _RMU_CTRL_PINRMODE_DISABLED,
  rmuResetModeLimited = _RMU_CTRL_PINRMODE_LIMITED,
  rmuResetModeExtended = _RMU_CTRL_PINRMODE_EXTENDED,
  rmuResetModeFull = _RMU_CTRL_PINRMODE_FULL
}
 

Functions

void RMU_ResetCauseClear (void)
 Clear the reset cause register. More...
 
uint32_t RMU_ResetCauseGet (void)
 Get the cause of the last reset. More...
 
void RMU_ResetControl (RMU_Reset_TypeDef reset, RMU_ResetMode_TypeDef mode)
 Disable/enable reset for various peripherals and signal sources. More...
 
__STATIC_INLINE uint32_t RMU_UserResetStateGet (void)
 Get user reset state. This state is reset only by a Power-on-reset and a pin reset. More...
 
__STATIC_INLINE void RMU_UserResetStateSet (uint32_t userState)
 Set user reset state. This state is reset only by a Power-on-reset and a pin reset. More...
 

Macro Definition Documentation

#define RMU_LockupResetDisable (   A)    RMU_ResetControl(rmuResetLockUp, A)

RMU_LockupResetDisable kept for backwards compatibility

Definition at line 104 of file em_rmu.h.

Enumeration Type Documentation

RMU controlled peripheral reset control and reset source control

Enumerator
rmuResetLockUp 

Cortex lockup reset select

rmuResetWdog 

WDOG reset select

rmuResetCoreLockup 

Cortex lockup reset select

rmuResetSys 

SYSRESET select

rmuResetPin 

Pin reset select

Definition at line 75 of file em_rmu.h.

RMU reset modes

Definition at line 61 of file em_rmu.h.

Function Documentation

void RMU_ResetCauseClear ( void  )

Clear the reset cause register.

This function clears all the reset cause bits of the RSTCAUSE register. The reset cause bits must be cleared by SW before a new reset occurs, otherwise reset causes may accumulate. See RMU_ResetCauseGet().

Definition at line 249 of file em_rmu.c.

References BUS_RegBitWrite(), EMU, EMU_Lock(), EMU_LOCK_LOCKKEY_LOCKED, EMU_Unlock(), RMU, and RMU_CMD_RCCLR.

Referenced by SLEEP_Init().

uint32_t RMU_ResetCauseGet ( void  )

Get the cause of the last reset.

In order to be useful, the reset cause must be cleared by software before a new reset occurs, otherwise reset causes may accumulate. See RMU_ResetCauseClear(). This function call will return the main cause for reset, which can be a bit mask (several causes), and clear away "noise".

Returns
Reset cause mask. Please consult the reference manual for description of the reset cause mask.

Definition at line 291 of file em_rmu.c.

References EMU_BASE, RMU, RMU_RSTCAUSE_AVDDBOD, RMU_RSTCAUSE_DECBOD, RMU_RSTCAUSE_DVDDBOD, RMU_RSTCAUSE_EM4RST, RMU_RSTCAUSE_EXTRST, RMU_RSTCAUSE_LOCKUPRST, RMU_RSTCAUSE_SYSREQRST, and RMU_RSTCAUSE_WDOGRST.

Referenced by SLEEP_Init().

void RMU_ResetControl ( RMU_Reset_TypeDef  reset,
RMU_ResetMode_TypeDef  mode 
)

Disable/enable reset for various peripherals and signal sources.

Parameters
[in]resetReset types to enable/disable
[in]modeReset mode

Definition at line 222 of file em_rmu.c.

References BUS_RegBitWrite(), RMU, and SL_CTZ().

__STATIC_INLINE uint32_t RMU_UserResetStateGet ( void  )

Get user reset state. This state is reset only by a Power-on-reset and a pin reset.

Returns
Reset surviving user state

Definition at line 134 of file em_rmu.h.

References _RMU_CTRL_RESETSTATE_MASK, _RMU_CTRL_RESETSTATE_SHIFT, and RMU.

__STATIC_INLINE void RMU_UserResetStateSet ( uint32_t  userState)

Set user reset state. This state is reset only by a Power-on-reset and a pin reset.

Parameters
[in]userStateUser state to set

Definition at line 118 of file em_rmu.h.

References _RMU_CTRL_RESETSTATE_MASK, _RMU_CTRL_RESETSTATE_SHIFT, and RMU.