nrfx 3.3
Macros | Enumerations | Functions
RESETINFO HAL

Hardware access layer for managing the Reset information peripheral (RESETINFO). More...

Macros

#define NRF_RESETINFO_HAS_RESETREAS_STRUCT   1
 Symbol indicating whether intermediate RESETREAS structure is present.
 
#define NRF_RESETINFO_HAS_MULTIPLE_SECWDT   1
 Symbol indicating whether multiple secure domain watchdog resets are present.
 
#define NRF_RESETINFO_HAS_MASKLOCKUP   1
 Symbol indicating whether CPU lockup signal masking is present.
 
#define NRF_RESETINFO_ERROR_STATUS_MAX   RESETINFO_ERROR_STATUS_ERRORSTATUS_Msk
 Maximum value of error status.
 

Enumerations

enum  nrf_resetinfo_resetreas_global_mask_t {
  NRF_RESETINFO_RESETREAS_GLOBAL_POR_MASK = RESETINFO_RESETREAS_GLOBAL_RESETPOR_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_PIN_MASK = RESETINFO_RESETREAS_GLOBAL_RESETPIN_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_DOG_MASK = RESETINFO_RESETREAS_GLOBAL_DOG_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_CTRLAP_MASK = RESETINFO_RESETREAS_GLOBAL_CTRLAP_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_SECSREQ_MASK = RESETINFO_RESETREAS_GLOBAL_SECSREQ_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_SECWDT0_MASK = RESETINFO_RESETREAS_GLOBAL_SECWDT0_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_SECWDT1_MASK = RESETINFO_RESETREAS_GLOBAL_SECWDT1_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_SECLOCKUP_MASK = RESETINFO_RESETREAS_GLOBAL_SECLOCKUP_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_SECTAMPER_MASK = RESETINFO_RESETREAS_GLOBAL_SECTAMPER_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_GPIO_MASK = RESETINFO_RESETREAS_GLOBAL_OFF_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_LPCOMP_MASK = RESETINFO_RESETREAS_GLOBAL_LPCOMP_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_DIF_MASK = RESETINFO_RESETREAS_GLOBAL_DIF_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_GRTC_MASK = RESETINFO_RESETREAS_GLOBAL_GRTC_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_NFC_MASK = RESETINFO_RESETREAS_GLOBAL_NFC_Msk ,
  NRF_RESETINFO_RESETREAS_GLOBAL_VUSB_MASK = RESETINFO_RESETREAS_GLOBAL_VUSB_Msk
}
 Global reset reason mask. More...
 
enum  nrf_resetinfo_resetreas_local_mask_t {
  NRF_RESETINFO_RESETREAS_LOCAL_DOG_MASK = RESETINFO_RESETREAS_LOCAL_DOG_Msk ,
  NRF_RESETINFO_RESETREAS_LOCAL_DOGNS_MASK = RESETINFO_RESETREAS_LOCAL_DOGNS_Msk ,
  NRF_RESETINFO_RESETREAS_LOCAL_SREQ_MASK = RESETINFO_RESETREAS_LOCAL_SREQ_Msk ,
  NRF_RESETINFO_RESETREAS_LOCAL_LOCKUP_MASK = RESETINFO_RESETREAS_LOCAL_LOCKUP_Msk ,
  NRF_RESETINFO_RESETREAS_LOCAL_CROSSDOMAIN_MASK = RESETINFO_RESETREAS_LOCAL_CROSSDOMAIN_Msk ,
  NRF_RESETINFO_RESETREAS_LOCAL_UNRETAINED_MASK = RESETINFO_RESETREAS_LOCAL_UNRETAINEDWAKE_Msk
}
 Local reset reason mask. More...
 

Functions

NRF_STATIC_INLINE void nrf_resetinfo_resetreas_global_set (NRF_RESETINFO_Type *p_reg, uint32_t mask)
 Function for setting the global reset reason.
 
NRF_STATIC_INLINE uint32_t nrf_resetinfo_resetreas_global_get (NRF_RESETINFO_Type const *p_reg)
 Function for getting the global reset reason.
 
NRF_STATIC_INLINE void nrf_resetinfo_resetreas_local_set (NRF_RESETINFO_Type *p_reg, uint32_t mask)
 Function for setting the local reset reason.
 
NRF_STATIC_INLINE uint32_t nrf_resetinfo_resetreas_local_get (NRF_RESETINFO_Type const *p_reg)
 Function for getting the local reset reason.
 
NRF_STATIC_INLINE void nrf_resetinfo_error_status_set (NRF_RESETINFO_Type *p_reg, uint8_t status)
 Function for setting the reset error status.
 
NRF_STATIC_INLINE uint8_t nrf_resetinfo_error_status_get (NRF_RESETINFO_Type const *p_reg)
 Function for getting the reset error status.
 
NRF_STATIC_INLINE void nrf_resetinfo_error_address_set (NRF_RESETINFO_Type *p_reg, uint32_t address)
 Function for setting the reset error address.
 
NRF_STATIC_INLINE uint32_t nrf_resetinfo_error_address_get (NRF_RESETINFO_Type const *p_reg)
 Function for getting the reset error address.
 
NRF_STATIC_INLINE void nrf_resetinfo_restore_valid_set (NRF_RESETINFO_Type *p_reg, bool enable)
 Function for setting the flag indicating presence of valid restore image in RAM.
 
NRF_STATIC_INLINE bool nrf_resetinfo_restore_valid_check (NRF_RESETINFO_Type const *p_reg)
 Function for getting the flag indicating presence of valid restore image in RAM.
 
NRF_STATIC_INLINE void nrf_resetinfo_mask_lockup_set (NRF_RESETINFO_Type *p_reg, bool enable)
 Function for setting the flag indicating if CPU lockup signal is to be masked.
 
NRF_STATIC_INLINE bool nrf_resetinfo_mask_lockup_check (NRF_RESETINFO_Type const *p_reg)
 Function for getting the flag indicating if CPU lockup signal is to be masked.
 

Detailed Description

Hardware access layer for managing the Reset information peripheral (RESETINFO).

Enumeration Type Documentation

◆ nrf_resetinfo_resetreas_global_mask_t

Global reset reason mask.

Enumerator
NRF_RESETINFO_RESETREAS_GLOBAL_POR_MASK 

Reset from power on reset.

NRF_RESETINFO_RESETREAS_GLOBAL_PIN_MASK 

Reset from pin reset.

NRF_RESETINFO_RESETREAS_GLOBAL_DOG_MASK 

Reset from the SysCtrl watchdog timer.

NRF_RESETINFO_RESETREAS_GLOBAL_CTRLAP_MASK 

Reset from CTRL-AP.

NRF_RESETINFO_RESETREAS_GLOBAL_SECSREQ_MASK 

Reset due to secure domain system reset request.

NRF_RESETINFO_RESETREAS_GLOBAL_SECWDT0_MASK 

Reset due to secure domain watchdog 0 timer.

NRF_RESETINFO_RESETREAS_GLOBAL_SECWDT1_MASK 

Reset due to secure domain watchdog 1 timer.

NRF_RESETINFO_RESETREAS_GLOBAL_SECLOCKUP_MASK 

Reset due to secure domain lockup.

NRF_RESETINFO_RESETREAS_GLOBAL_SECTAMPER_MASK 

Reset due to secure domain tamper detected.

NRF_RESETINFO_RESETREAS_GLOBAL_GPIO_MASK 

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

NRF_RESETINFO_RESETREAS_GLOBAL_LPCOMP_MASK 

Reset due to wakeup from System OFF triggered by LPCOMP.

NRF_RESETINFO_RESETREAS_GLOBAL_DIF_MASK 

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

NRF_RESETINFO_RESETREAS_GLOBAL_GRTC_MASK 

Reset due to wakeup from System OFF triggered by GRTC interrupt.

NRF_RESETINFO_RESETREAS_GLOBAL_NFC_MASK 

Reset due to wakeup from System OFF triggered by NRF field detection in sense mode.

NRF_RESETINFO_RESETREAS_GLOBAL_VUSB_MASK 

Reset due to wakeup from System OFF triggered by VBUS rising into valid range.

◆ nrf_resetinfo_resetreas_local_mask_t

Local reset reason mask.

Enumerator
NRF_RESETINFO_RESETREAS_LOCAL_DOG_MASK 

Reset from the local watchdog timer.

NRF_RESETINFO_RESETREAS_LOCAL_DOGNS_MASK 

Reset from the local non-secure watchdog timer.

NRF_RESETINFO_RESETREAS_LOCAL_SREQ_MASK 

Reset from the local soft reset request.

NRF_RESETINFO_RESETREAS_LOCAL_LOCKUP_MASK 

Reset from local CPU lockup.

NRF_RESETINFO_RESETREAS_LOCAL_CROSSDOMAIN_MASK 

Reset due to cross domain reset source.

NRF_RESETINFO_RESETREAS_LOCAL_UNRETAINED_MASK 

Reset due to wake from unretained state.

Function Documentation

◆ nrf_resetinfo_error_address_get()

NRF_STATIC_INLINE uint32_t nrf_resetinfo_error_address_get ( NRF_RESETINFO_Type const *  p_reg)

Function for getting the reset error address.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Reset error address.

◆ nrf_resetinfo_error_address_set()

NRF_STATIC_INLINE void nrf_resetinfo_error_address_set ( NRF_RESETINFO_Type *  p_reg,
uint32_t  address 
)

Function for setting the reset error address.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]addressReset error address to be set.

◆ nrf_resetinfo_error_status_get()

NRF_STATIC_INLINE uint8_t nrf_resetinfo_error_status_get ( NRF_RESETINFO_Type const *  p_reg)

Function for getting the reset error status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Reset error status.

◆ nrf_resetinfo_error_status_set()

NRF_STATIC_INLINE void nrf_resetinfo_error_status_set ( NRF_RESETINFO_Type *  p_reg,
uint8_t  status 
)

Function for setting the reset error status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]statusReset error status to be set.

◆ nrf_resetinfo_mask_lockup_check()

NRF_STATIC_INLINE bool nrf_resetinfo_mask_lockup_check ( NRF_RESETINFO_Type const *  p_reg)

Function for getting the flag indicating if CPU lockup signal is to be masked.

Note
Prevents the CPU lockup signal from triggering a local reset. Needed to be able to start debug session.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueCPU lockup signal is to be masked.
falseCPU lockup signal is not to be masked.

◆ nrf_resetinfo_mask_lockup_set()

NRF_STATIC_INLINE void nrf_resetinfo_mask_lockup_set ( NRF_RESETINFO_Type *  p_reg,
bool  enable 
)

Function for setting the flag indicating if CPU lockup signal is to be masked.

Note
Prevents the CPU lockup signal from triggering a local reset. Needed to be able to start debug session.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if lockup signal is to be masked, false otherwise.

◆ nrf_resetinfo_resetreas_global_get()

NRF_STATIC_INLINE uint32_t nrf_resetinfo_resetreas_global_get ( NRF_RESETINFO_Type const *  p_reg)

Function for getting the global reset reason.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Mask of detected global reset reasons constructed with nrf_resetinfo_resetreas_global_mask_t.

◆ nrf_resetinfo_resetreas_global_set()

NRF_STATIC_INLINE void nrf_resetinfo_resetreas_global_set ( NRF_RESETINFO_Type *  p_reg,
uint32_t  mask 
)

Function for setting the global reset reason.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of reasons to be set, constructed from nrf_resetinfo_resetreas_global_mask_t enumerator values.

◆ nrf_resetinfo_resetreas_local_get()

NRF_STATIC_INLINE uint32_t nrf_resetinfo_resetreas_local_get ( NRF_RESETINFO_Type const *  p_reg)

Function for getting the local reset reason.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Mask of detected local reset reasons constructed with nrf_resetinfo_resetreas_local_mask_t.

◆ nrf_resetinfo_resetreas_local_set()

NRF_STATIC_INLINE void nrf_resetinfo_resetreas_local_set ( NRF_RESETINFO_Type *  p_reg,
uint32_t  mask 
)

Function for setting the local reset reason.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of reasons to be set, constructed from nrf_resetinfo_resetreas_local_mask_t enumerator values.

◆ nrf_resetinfo_restore_valid_check()

NRF_STATIC_INLINE bool nrf_resetinfo_restore_valid_check ( NRF_RESETINFO_Type const *  p_reg)

Function for getting the flag indicating presence of valid restore image in RAM.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueValid restore image is present in RAM.
falseValid restore image is not present in RAM.

◆ nrf_resetinfo_restore_valid_set()

NRF_STATIC_INLINE void nrf_resetinfo_restore_valid_set ( NRF_RESETINFO_Type *  p_reg,
bool  enable 
)

Function for setting the flag indicating presence of valid restore image in RAM.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if valid restore image is present in RAM, false otherwise.

Documentation feedback | Developer Zone | Subscribe | Updated