nrfx 3.3
Macros | Enumerations | Functions
Generic Reset Reason layer

Helper layer that provides a uniform way of checking the reset reason. More...

Macros

#define NRFX_RESET_REASON_HAS_CTRLAP   1
 Symbol indicating whether CTRAP reset reason is present.
 
#define NRFX_RESET_REASON_HAS_NETWORK   1
 Symbol indicating whether network reset reasons are present.
 
#define NRFX_RESET_REASON_HAS_LPCOMP   1
 Symbol indicating whether LPCOMP reset reason is present.
 
#define NRFX_RESET_REASON_HAS_NFC   1
 Symbol indicating whether NFC reset reason is present.
 
#define NRFX_RESET_REASON_HAS_VBUS   1
 Symbol indicating whether VBUS reset reason is present.
 
#define NRFX_RESET_REASON_HAS_CTRLAPSOFT   1
 Symbol indicating whether CTRL-AP reset reason is present.
 
#define NRFX_RESET_REASON_HAS_CTRLAPHARD   1
 Symbol indicating whether CTRL-AP hard reset reason is present.
 
#define NRFX_RESET_REASON_HAS_CTRLAPPIN   1
 Symbol indicating whether CTRL-AP pin reset reason is present.
 
#define NRFX_RESET_REASON_HAS_GRTC   1
 Symbol indicating whether GRTC reset reason is present.
 
#define NRFX_RESET_REASON_HAS_SECTAMPER   1
 Symbol indicating whether GRTC reset reason is present.
 

Enumerations

enum  nrfx_reset_reason_mask_t {
  NRFX_RESET_REASON_RESETPIN_MASK = RESET_RESETREAS_RESETPIN_Msk ,
  NRFX_RESET_REASON_DOG0_MASK = RESET_RESETREAS_DOG0_Msk ,
  NRFX_RESET_REASON_DOG_MASK = NRFX_RESET_REASON_DOG0_MASK ,
  NRFX_RESET_REASON_CTRLAP_MASK = RESET_RESETREAS_CTRLAP_Msk ,
  NRFX_RESETREAS_SREQ_MASK = RESET_RESETREAS_SREQ_Msk ,
  NRFX_RESET_REASON_SREQ_MASK = RESET_RESETREAS_SREQ_Msk ,
  NRFX_RESET_REASON_LOCKUP_MASK = RESET_RESETREAS_LOCKUP_Msk ,
  NRFX_RESET_REASON_OFF_MASK = RESET_RESETREAS_OFF_Msk ,
  NRFX_RESET_REASON_LPCOMP_MASK = RESET_RESETREAS_LPCOMP_Msk ,
  NRFX_RESET_REASON_DIF_MASK = RESET_RESETREAS_DIF_Msk ,
  NRFX_RESET_REASON_LSREQ_MASK = RESET_RESETREAS_LSREQ_Msk ,
  NRFX_RESET_REASON_LLOCKUP_MASK = RESET_RESETREAS_LLOCKUP_Msk ,
  NRFX_RESET_REASON_LDOG_MASK = RESET_RESETREAS_LDOG_Msk ,
  NRFX_RESET_REASON_MFORCEOFF_MASK = RESET_RESETREAS_MFORCEOFF_Msk ,
  NRFX_RESET_REASON_NFC_MASK = RESET_RESETREAS_NFC_Msk ,
  NRFX_RESET_REASON_DOG1_MASK = RESET_RESETREAS_DOG1_Msk ,
  NRFX_RESET_REASON_VBUS_MASK = RESET_RESETREAS_VBUS_Msk ,
  NRFX_RESET_REASON_LCTRLAP_MASK = RESET_RESETREAS_LCTRLAP_Msk ,
  NRFX_RESET_REASON_CTRLAPHARD_MASK = RESET_RESETREAS_CTRLAPHARD_Msk ,
  NRFX_RESET_REASON_CTRLAPPIN_MASK = RESET_RESETREAS_CTRLAPPIN_Msk ,
  NRFX_RESET_REASON_GRTC_MASK = RESET_RESETREAS_GRTC_Msk ,
  NRFX_RESET_REASON_SECTAMPER_MASK = RESET_RESETREAS_SECTAMPER_Msk
}
 Reset reason bit masks. More...
 

Functions

__STATIC_INLINE uint32_t nrfx_reset_reason_get (void)
 Function for getting the reset reason bitmask.
 
__STATIC_INLINE void nrfx_reset_reason_clear (uint32_t mask)
 Function for clearing the selected reset reason fields.
 

Detailed Description

Helper layer that provides a uniform way of checking the reset reason.

Enumeration Type Documentation

◆ nrfx_reset_reason_mask_t

Reset reason bit masks.

Enumerator
NRFX_RESET_REASON_RESETPIN_MASK 

Reset from pin-reset detected. Reset from watchdog/application watchdog timer 0 detected.

NRFX_RESET_REASON_DOG0_MASK 

Reset from watchdog/application watchdog timer 0 detected.

NRFX_RESET_REASON_DOG_MASK 

Reset from application CTRL-AP detected.

NRFX_RESET_REASON_CTRLAP_MASK 

Reset from soft reset/application soft reset detected. Deprecated.

NRFX_RESETREAS_SREQ_MASK 

Reset from soft reset/application soft reset detected.

NRFX_RESET_REASON_SREQ_MASK 

Reset from CPU lockup/application CPU lockup detected.

NRFX_RESET_REASON_LOCKUP_MASK 

Reset due to wakeup from System OFF mode when wakeup is triggered by DETECT signal from GPIO.

NRFX_RESET_REASON_OFF_MASK 

Reset due to wakeup from System OFF mode when wakeup is triggered by ANADETECT signal from LPCOMP.

NRFX_RESET_REASON_LPCOMP_MASK 

Reset due to wakeup from System OFF mode when wakeup is triggered by entering the debug interface mode.

NRFX_RESET_REASON_DIF_MASK 

Reset from network soft reset detected.

NRFX_RESET_REASON_LSREQ_MASK 

Reset from network CPU lockup detected.

NRFX_RESET_REASON_LLOCKUP_MASK 

Reset from network watchdog timer detected.

NRFX_RESET_REASON_LDOG_MASK 

Force off reset from application core detected.

NRFX_RESET_REASON_NFC_MASK 

Reset after wakeup from System OFF mode due to NFC field being detected. Reset from application watchdog timer 1 detected.

NRFX_RESET_REASON_DOG1_MASK 

Reset after wakeup from System OFF mode due to VBUS rising into valid range.

NRFX_RESET_REASON_VBUS_MASK 

Reset from network CTRL-AP detected.

NRFX_RESET_REASON_CTRLAPHARD_MASK 

Reset due to CTRL-AP hard reset. Reset due to CTRL-AP pin reset.

NRFX_RESET_REASON_CTRLAPPIN_MASK 

Reset due to wakeup from GRTC.

NRFX_RESET_REASON_GRTC_MASK 

Reset due to illegal tampering of the device.

Function Documentation

◆ nrfx_reset_reason_clear()

__STATIC_INLINE void nrfx_reset_reason_clear ( uint32_t  mask)

Function for clearing the selected reset reason fields.

Parameters
[in]maskMask constructed from nrfx_reset_reason_mask_t values.

◆ nrfx_reset_reason_get()

__STATIC_INLINE uint32_t nrfx_reset_reason_get ( void  )

Function for getting the reset reason bitmask.

Unless cleared, the RESETREAS register is cumulative. If none of the reset sources is flagged, the chip was reset from the on-chip reset generator. This indicates a power-on-reset or a brown out reset.

Returns
Mask of reset reasons constructed from nrfx_reset_reason_mask_t values.

Documentation feedback | Developer Zone | Subscribe | Updated