Generic Reset Reason layer

group nrfx_reset_reason

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

Defines

NRFX_RESET_REASON_HAS_CTRLAP

Symbol indicating whether CTRAP reset reason is present.

NRFX_RESET_REASON_HAS_NETWORK

Symbol indicating whether network reset reasons are present.

NRFX_RESET_REASON_HAS_LPCOMP

Symbol indicating whether LPCOMP reset reason is present.

NRFX_RESET_REASON_HAS_NFC

Symbol indicating whether NFC reset reason is present.

NRFX_RESET_REASON_HAS_VBUS

Symbol indicating whether VBUS reset reason is present.

NRFX_RESET_REASON_HAS_CTRLAPSOFT

Symbol indicating whether CTRL-AP reset reason is present.

NRFX_RESET_REASON_HAS_CTRLAPHARD

Symbol indicating whether CTRL-AP hard reset reason is present.

NRFX_RESET_REASON_HAS_CTRLAPPIN

Symbol indicating whether CTRL-AP pin reset reason is present.

NRFX_RESET_REASON_HAS_GRTC

Symbol indicating whether GRTC reset reason is present.

NRFX_RESET_REASON_HAS_SECTAMPER

Symbol indicating whether GRTC reset reason is present.

Enums

enum nrfx_reset_reason_mask_t

Reset reason bit masks.

Values:

enumerator NRFX_RESET_REASON_RESETPIN_MASK

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

enumerator NRFX_RESET_REASON_DOG0_MASK

Reset from watchdog/application watchdog timer 0 detected.

enumerator NRFX_RESET_REASON_DOG_MASK

Reset from application CTRL-AP detected.

enumerator NRFX_RESET_REASON_CTRLAP_MASK

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

enumerator NRFX_RESETREAS_SREQ_MASK

Reset from soft reset/application soft reset detected.

enumerator NRFX_RESET_REASON_SREQ_MASK

Reset from CPU lockup/application CPU lockup detected.

enumerator NRFX_RESET_REASON_LOCKUP_MASK

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

enumerator NRFX_RESET_REASON_OFF_MASK

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

enumerator NRFX_RESET_REASON_LPCOMP_MASK

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

enumerator NRFX_RESET_REASON_DIF_MASK

Reset from network soft reset detected.

enumerator NRFX_RESET_REASON_LSREQ_MASK

Reset from network CPU lockup detected.

enumerator NRFX_RESET_REASON_LLOCKUP_MASK

Reset from network watchdog timer detected.

enumerator NRFX_RESET_REASON_LDOG_MASK

Force off reset from application core detected.

enumerator NRFX_RESET_REASON_MFORCEOFF_MASK
enumerator 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.

enumerator NRFX_RESET_REASON_DOG1_MASK

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

enumerator NRFX_RESET_REASON_VBUS_MASK

Reset from network CTRL-AP detected.

enumerator NRFX_RESET_REASON_LCTRLAP_MASK
enumerator NRFX_RESET_REASON_CTRLAPHARD_MASK

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

enumerator NRFX_RESET_REASON_CTRLAPPIN_MASK

Reset due to wakeup from GRTC.

enumerator NRFX_RESET_REASON_GRTC_MASK

Reset due to illegal tampering of the device.

enumerator NRFX_RESET_REASON_SECTAMPER_MASK

Functions

__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.

__STATIC_INLINE void nrfx_reset_reason_clear(uint32_t mask)

Function for clearing the selected reset reason fields.

Parameters: