nrfx 2.5
Macros | Enumerations | Functions
REGULATORS HAL

Hardware access layer for managing the REGULATORS peripheral. More...

Macros

#define NRF_REGULATORS_HAS_MAINREGSTATUS   1
 Symbol indicating whether MAINREGSTATUS register is present.
 
#define NRF_REGULATORS_HAS_POFCON   1
 Symbol indicating whether power failure comparator is present.
 
#define NRF_REGULATORS_HAS_POFCON_VDDH   1
 Symbol indicating whether power failure comparator for VDDH is present.
 
#define NRF_REGULATORS_HAS_DCDCEN_VDDH   1
 Symbol indicating whether high voltage regulator is present.
 
#define NRF_REGULATORS_HAS_DCDCEN_RADIO   1
 Symbol indicating whether radio regulator is present.
 

Enumerations

enum  nrf_regulators_mainregstatus_t {
  NRF_REGULATORS_MAINREGSTATUS_NORMAL = REGULATORS_MAINREGSTATUS_VREGH_Inactive,
  NRF_REGULATORS_MAINREGSTATUS_HIGH = REGULATORS_MAINREGSTATUS_VREGH_Active
}
 Main regulator status. More...
 
enum  nrf_regulators_pof_thr_t {
  NRF_REGULATORS_POFTHR_V19 = REGULATORS_POFCON_THRESHOLD_V19,
  NRF_REGULATORS_POFTHR_V20 = REGULATORS_POFCON_THRESHOLD_V20,
  NRF_REGULATORS_POFTHR_V21 = REGULATORS_POFCON_THRESHOLD_V21,
  NRF_REGULATORS_POFTHR_V22 = REGULATORS_POFCON_THRESHOLD_V22,
  NRF_REGULATORS_POFTHR_V23 = REGULATORS_POFCON_THRESHOLD_V23,
  NRF_REGULATORS_POFTHR_V24 = REGULATORS_POFCON_THRESHOLD_V24,
  NRF_REGULATORS_POFTHR_V25 = REGULATORS_POFCON_THRESHOLD_V25,
  NRF_REGULATORS_POFTHR_V26 = REGULATORS_POFCON_THRESHOLD_V26,
  NRF_REGULATORS_POFTHR_V27 = REGULATORS_POFCON_THRESHOLD_V27,
  NRF_REGULATORS_POFTHR_V28 = REGULATORS_POFCON_THRESHOLD_V28
}
 Power failure comparator thresholds. More...
 
enum  nrf_regulators_pof_thrvddh_t {
  NRF_REGULATORS_POFTHRVDDH_V27 = REGULATORS_POFCON_THRESHOLDVDDH_V27,
  NRF_REGULATORS_POFTHRVDDH_V28 = REGULATORS_POFCON_THRESHOLDVDDH_V28,
  NRF_REGULATORS_POFTHRVDDH_V29 = REGULATORS_POFCON_THRESHOLDVDDH_V29,
  NRF_REGULATORS_POFTHRVDDH_V30 = REGULATORS_POFCON_THRESHOLDVDDH_V30,
  NRF_REGULATORS_POFTHRVDDH_V31 = REGULATORS_POFCON_THRESHOLDVDDH_V31,
  NRF_REGULATORS_POFTHRVDDH_V32 = REGULATORS_POFCON_THRESHOLDVDDH_V32,
  NRF_REGULATORS_POFTHRVDDH_V33 = REGULATORS_POFCON_THRESHOLDVDDH_V33,
  NRF_REGULATORS_POFTHRVDDH_V34 = REGULATORS_POFCON_THRESHOLDVDDH_V34,
  NRF_REGULATORS_POFTHRVDDH_V35 = REGULATORS_POFCON_THRESHOLDVDDH_V35,
  NRF_REGULATORS_POFTHRVDDH_V36 = REGULATORS_POFCON_THRESHOLDVDDH_V36,
  NRF_REGULATORS_POFTHRVDDH_V37 = REGULATORS_POFCON_THRESHOLDVDDH_V37,
  NRF_REGULATORS_POFTHRVDDH_V38 = REGULATORS_POFCON_THRESHOLDVDDH_V38,
  NRF_REGULATORS_POFTHRVDDH_V39 = REGULATORS_POFCON_THRESHOLDVDDH_V39,
  NRF_REGULATORS_POFTHRVDDH_V40 = REGULATORS_POFCON_THRESHOLDVDDH_V40,
  NRF_REGULATORS_POFTHRVDDH_V41 = REGULATORS_POFCON_THRESHOLDVDDH_V41,
  NRF_REGULATORS_POFTHRVDDH_V42 = REGULATORS_POFCON_THRESHOLDVDDH_V42
}
 Power failure comparator thresholds for VDDH. More...
 

Functions

NRF_STATIC_INLINE void nrf_regulators_dcdcen_set (NRF_REGULATORS_Type *p_reg, bool enable)
 Function for enabling or disabling DCDC converter. More...
 
NRF_STATIC_INLINE void nrf_regulators_system_off (NRF_REGULATORS_Type *p_reg)
 Function for putting CPU in system OFF mode. More...
 
NRF_STATIC_INLINE nrf_regulators_mainregstatus_t nrf_regulators_mainregstatus_get (NRF_REGULATORS_Type const *p_reg)
 Function for getting the main supply status. More...
 
NRF_STATIC_INLINE void nrf_regulators_pofcon_set (NRF_REGULATORS_Type *p_reg, bool enable, nrf_regulators_pof_thr_t thr)
 Function for setting the power failure comparator configuration. More...
 
NRF_STATIC_INLINE nrf_regulators_pof_thr_t nrf_regulators_pofcon_get (NRF_REGULATORS_Type const *p_reg, bool *p_enabled)
 Function for getting the power failure comparator configuration. More...
 
NRF_STATIC_INLINE void nrf_regulators_pofcon_vddh_set (NRF_REGULATORS_Type *p_reg, nrf_regulators_pof_thrvddh_t thr)
 Function for setting the VDDH power failure comparator threshold. More...
 
NRF_STATIC_INLINE nrf_regulators_pof_thrvddh_t nrf_regulators_pofcon_vddh_get (NRF_REGULATORS_Type const *p_reg)
 Function for getting the VDDH regulators failure comparator threshold. More...
 
NRF_STATIC_INLINE void nrf_regulators_dcdcen_vddh_set (NRF_REGULATORS_Type *p_reg, bool enable)
 Function for enabling or disabling the high voltage regulator. More...
 
NRF_STATIC_INLINE void nrf_regulators_dcdcen_radio_set (NRF_REGULATORS_Type *p_reg, bool enable)
 Function for enabling or disabling the radio regulator. More...
 

Detailed Description

Hardware access layer for managing the REGULATORS peripheral.

Enumeration Type Documentation

◆ nrf_regulators_mainregstatus_t

Main regulator status.

Enumerator
NRF_REGULATORS_MAINREGSTATUS_NORMAL 

Normal voltage mode. Voltage supplied on VDD and VDDH.

NRF_REGULATORS_MAINREGSTATUS_HIGH 

High voltage mode. Voltage supplied on VDDH.

◆ nrf_regulators_pof_thr_t

Power failure comparator thresholds.

Enumerator
NRF_REGULATORS_POFTHR_V19 

Set threshold to 1.9 V.

NRF_REGULATORS_POFTHR_V20 

Set threshold to 2.0 V.

NRF_REGULATORS_POFTHR_V21 

Set threshold to 2.1 V.

NRF_REGULATORS_POFTHR_V22 

Set threshold to 2.2 V.

NRF_REGULATORS_POFTHR_V23 

Set threshold to 2.3 V.

NRF_REGULATORS_POFTHR_V24 

Set threshold to 2.4 V.

NRF_REGULATORS_POFTHR_V25 

Set threshold to 2.5 V.

NRF_REGULATORS_POFTHR_V26 

Set threshold to 2.6 V.

NRF_REGULATORS_POFTHR_V27 

Set threshold to 2.7 V.

NRF_REGULATORS_POFTHR_V28 

Set threshold to 2.8 V.

◆ nrf_regulators_pof_thrvddh_t

Power failure comparator thresholds for VDDH.

Enumerator
NRF_REGULATORS_POFTHRVDDH_V27 

Set threshold to 2.7 V.

NRF_REGULATORS_POFTHRVDDH_V28 

Set threshold to 2.8 V.

NRF_REGULATORS_POFTHRVDDH_V29 

Set threshold to 2.9 V.

NRF_REGULATORS_POFTHRVDDH_V30 

Set threshold to 3.0 V.

NRF_REGULATORS_POFTHRVDDH_V31 

Set threshold to 3.1 V.

NRF_REGULATORS_POFTHRVDDH_V32 

Set threshold to 3.2 V.

NRF_REGULATORS_POFTHRVDDH_V33 

Set threshold to 3.3 V.

NRF_REGULATORS_POFTHRVDDH_V34 

Set threshold to 3.4 V.

NRF_REGULATORS_POFTHRVDDH_V35 

Set threshold to 3.5 V.

NRF_REGULATORS_POFTHRVDDH_V36 

Set threshold to 3.6 V.

NRF_REGULATORS_POFTHRVDDH_V37 

Set threshold to 3.7 V.

NRF_REGULATORS_POFTHRVDDH_V38 

Set threshold to 3.8 V.

NRF_REGULATORS_POFTHRVDDH_V39 

Set threshold to 3.9 V.

NRF_REGULATORS_POFTHRVDDH_V40 

Set threshold to 4.0 V.

NRF_REGULATORS_POFTHRVDDH_V41 

Set threshold to 4.1 V.

NRF_REGULATORS_POFTHRVDDH_V42 

Set threshold to 4.2 V.

Function Documentation

◆ nrf_regulators_dcdcen_radio_set()

NRF_STATIC_INLINE void nrf_regulators_dcdcen_radio_set ( NRF_REGULATORS_Type *  p_reg,
bool  enable 
)

Function for enabling or disabling the radio regulator.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if the radio regulator is to be enabled, false otherwise.

◆ nrf_regulators_dcdcen_set()

NRF_STATIC_INLINE void nrf_regulators_dcdcen_set ( NRF_REGULATORS_Type *  p_reg,
bool  enable 
)

Function for enabling or disabling DCDC converter.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if DCDC converter is to be enabled, false otherwise.

◆ nrf_regulators_dcdcen_vddh_set()

NRF_STATIC_INLINE void nrf_regulators_dcdcen_vddh_set ( NRF_REGULATORS_Type *  p_reg,
bool  enable 
)

Function for enabling or disabling the high voltage regulator.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if the high voltage regulator is to be enabled, false otherwise.

◆ nrf_regulators_mainregstatus_get()

NRF_STATIC_INLINE nrf_regulators_mainregstatus_t nrf_regulators_mainregstatus_get ( NRF_REGULATORS_Type const *  p_reg)

Function for getting the main supply status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The current main supply status.

◆ nrf_regulators_pofcon_get()

NRF_STATIC_INLINE nrf_regulators_pof_thr_t nrf_regulators_pofcon_get ( NRF_REGULATORS_Type const *  p_reg,
bool *  p_enabled 
)

Function for getting the power failure comparator configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_enabledFunction sets this boolean variable to true if power failure comparator is enabled. The pointer can be NULL if we do not need this information.
Returns
Threshold setting for power failure comparator.

◆ nrf_regulators_pofcon_set()

NRF_STATIC_INLINE void nrf_regulators_pofcon_set ( NRF_REGULATORS_Type *  p_reg,
bool  enable,
nrf_regulators_pof_thr_t  thr 
)

Function for setting the power failure comparator configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if power failure comparator is to be enabled, false otherwise.
[in]thrVoltage threshold value.

◆ nrf_regulators_pofcon_vddh_get()

NRF_STATIC_INLINE nrf_regulators_pof_thrvddh_t nrf_regulators_pofcon_vddh_get ( NRF_REGULATORS_Type const *  p_reg)

Function for getting the VDDH regulators failure comparator threshold.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Threshold setting for regulators failure comparator.

◆ nrf_regulators_pofcon_vddh_set()

NRF_STATIC_INLINE void nrf_regulators_pofcon_vddh_set ( NRF_REGULATORS_Type *  p_reg,
nrf_regulators_pof_thrvddh_t  thr 
)

Function for setting the VDDH power failure comparator threshold.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]thrThreshold to be set.

◆ nrf_regulators_system_off()

NRF_STATIC_INLINE void nrf_regulators_system_off ( NRF_REGULATORS_Type *  p_reg)

Function for putting CPU in system OFF mode.

This function puts the CPU into system off mode. The only way to wake up the CPU is by reset.

Note
This function never returns.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.

Documentation feedback | Developer Zone | Subscribe | Updated