nrfx 2.5
Enumerations | Functions
Generic Reset Reason layer

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

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_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_NFC_MASK = RESET_RESETREAS_NFC_Msk,
  NRFX_RESET_REASON_DOG1_MASK = RESET_RESETREAS_DOG1_Msk,
  NRFX_RESET_REASON_VBUS_MASK = RESET_RESETREAS_VBUS_Msk
}
 Reset reason bit masks. More...
 

Functions

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

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.

NRFX_RESET_REASON_DOG0_MASK 

Reset from watchdog/application watchdog timer 0 detected.

NRFX_RESET_REASON_DOG_MASK 

Reset from watchdog/application watchdog timer 0 detected.

NRFX_RESET_REASON_CTRLAP_MASK 

Reset from application CTRL-AP detected.

NRFX_RESETREAS_SREQ_MASK 

Reset from soft reset/application soft reset detected.

NRFX_RESET_REASON_LOCKUP_MASK 

Reset from CPU lockup/application CPU lockup detected.

NRFX_RESET_REASON_OFF_MASK 

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

NRFX_RESET_REASON_LPCOMP_MASK 

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

NRFX_RESET_REASON_DIF_MASK 

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

NRFX_RESET_REASON_NFC_MASK 

Reset after wakeup from System OFF mode due to NRF field being detected.

NRFX_RESET_REASON_DOG1_MASK 

Reset from application watchdog timer 1 detected.

NRFX_RESET_REASON_VBUS_MASK 

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

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