nrfx 3.3
Data Structures | Enumerations | Functions
VDETPOF5V0 HAL

Hardware access layer for managing the 5 V power-fail comparator (VDETPOF5V0). More...

Data Structures

struct  nrf_vdetpof5v0_cfg_t
 VDETPOF5V0 configuration. More...
 

Enumerations

enum  nrf_vdetpof5v0_task_t {
  NRF_VDETPOF5V0_TASK_POWER_UP = offsetof(NRF_VDETPOF5V0_Type, TASKS_PWRUP) ,
  NRF_VDETPOF5V0_TASK_POWER_DOWN = offsetof(NRF_VDETPOF5V0_Type, TASKS_PWRDOWN)
}
 VDETPOF5V0 tasks. More...
 
enum  nrf_vdetpof5v0_event_t {
  NRF_VDETPOF5V0_EVENT_READY = offsetof(NRF_VDETPOF5V0_Type, EVENTS_READY) ,
  NRF_VDETPOF5V0_EVENT_SETTLED = offsetof(NRF_VDETPOF5V0_Type, EVENTS_SETTLED) ,
  NRF_VDETPOF5V0_EVENT_POFWARN = offsetof(NRF_VDETPOF5V0_Type, EVENTS_POFWARN)
}
 VDETPOF5V0 events. More...
 
enum  nrf_vdetpof5v0_int_mask_t {
  NRF_VDETPOF5V0_INT_READY_MASK = VDETPOF5V0_INTENSET_READY_Msk ,
  NRF_VDETPOF5V0_INT_SETTLED_MASK = VDETPOF5V0_INTENSET_SETTLED_Msk ,
  NRF_VDETPOF5V0_INT_POFWARN_MASK = VDETPOF5V0_INTENSET_POFWARN_Msk
}
 VDETPOF5V0 interrupt mask. More...
 
enum  nrf_vdetpof5v0_hyst_t {
  NRF_VDETPOF5V0_HYST_0MV = VDETPOF5V0_CONFIG_CFG_POFWARNHYST_Val0V000 ,
  NRF_VDETPOF5V0_HYST_25MV = VDETPOF5V0_CONFIG_CFG_POFWARNHYST_Val0V025 ,
  NRF_VDETPOF5V0_HYST_50MV = VDETPOF5V0_CONFIG_CFG_POFWARNHYST_Val0V050 ,
  NRF_VDETPOF5V0_HYST_100MV = VDETPOF5V0_CONFIG_CFG_POFWARNHYST_Val0V100
}
 VDETPOF5V0 power-fail comparator hysteresis voltage. More...
 
enum  nrf_vdetpof5v0_statusana_t {
  NRF_VDETPOF5V0_STATUSANA_READY = VDETPOF5V0_STATUSANA_READY_Msk ,
  NRF_VDETPOF5V0_STATUSANA_SETTLED = VDETPOF5V0_STATUSANA_SETTLED_Msk ,
  NRF_VDETPOF5V0_STATUSANA_POFWARN = VDETPOF5V0_STATUSANA_POFWARN_Msk
}
 VDETPOF5V0 status of analog module output signals. More...
 
enum  nrf_vdetpof5v0_analog_signal_t {
  NRF_VDETPOF5V0_ANALOG_SIGNAL_PWRUP ,
  NRF_VDETPOF5V0_ANALOG_SIGNAL_RETAIN ,
  NRF_VDETPOF5V0_ANALOG_SIGNAL_READY ,
  NRF_VDETPOF5V0_ANALOG_SIGNAL_SETTLED ,
  NRF_VDETPOF5V0_ANALOG_SIGNAL_POFWARN
}
 Analog signal to be overridden. More...
 
enum  nrf_vdetpof5v0_dft_atb0_selmux_t {
  NRF_VDETPOF5V0_DFT_ATB0_SELMUX_ATB0_SENSE = VDETPOF5V0_DFT_ATB0CONFIG_SELMUX_ATB0sense ,
  NRF_VDETPOF5V0_DFT_ATB0_SELMUX_CONNECT_VSS = VDETPOF5V0_DFT_ATB0CONFIG_SELMUX_ConnectVSS
}
 Select multiplexer for ATB0. More...
 
enum  nrf_vdetpof5v0_dft_atb1_selmux_t {
  NRF_VDETPOF5V0_DFT_ATB1_SELMUX_CONNECT_VREF = VDETPOF5V0_DFT_ATB1CONFIG_SELMUX_ConnectVref ,
  NRF_VDETPOF5V0_DFT_ATB1_SELMUX_CONNECT_VDIV = VDETPOF5V0_DFT_ATB1CONFIG_SELMUX_ConnectVdiv
}
 Select multiplexer for ATB1. More...
 
enum  nrf_vdetpof5v0_dft_dtb0_selmux_t {
  NRF_VDETPOF5V0_DFT_DTB0_SELMUX_READY = VDETPOF5V0_DFT_DTB0CONFIG_SELMUX_Ready ,
  NRF_VDETPOF5V0_DFT_DTB0_SELMUX_POFWARN = VDETPOF5V0_DFT_DTB0CONFIG_SELMUX_PofWarn
}
 Select multiplexer for DTB0. More...
 
enum  nrf_vdetpof5v0_dft_dtb1_selmux_t {
  NRF_VDETPOF5V0_DFT_DTB1_SELMUX_READYCMP = VDETPOF5V0_DFT_DTB1CONFIG_SELMUX_ReadyCmp ,
  NRF_VDETPOF5V0_DFT_DTB1_SELMUX_SETTLED = VDETPOF5V0_DFT_DTB1CONFIG_SELMUX_Settled
}
 Select multiplexer for DTB1. More...
 

Functions

NRF_STATIC_INLINE uint32_t nrf_vdetpof5v0_task_address_get (NRF_VDETPOF5V0_Type const *p_reg, nrf_vdetpof5v0_task_t task)
 Function for retrieving the address of the specified VDETPOF5V0 task.
 
NRF_STATIC_INLINE void nrf_vdetpof5v0_task_trigger (NRF_VDETPOF5V0_Type *p_reg, nrf_vdetpof5v0_task_t task)
 Function for triggering the specified VDETPOF5V0 task.
 
NRF_STATIC_INLINE uint32_t nrf_vdetpof5v0_event_address_get (NRF_VDETPOF5V0_Type const *p_reg, nrf_vdetpof5v0_event_t event)
 Function for retrieving the address of the specified VDETPOF5V0 event.
 
NRF_STATIC_INLINE void nrf_vdetpof5v0_event_clear (NRF_VDETPOF5V0_Type *p_reg, nrf_vdetpof5v0_event_t event)
 Function for clearing the specified VDETPOF5V0 event.
 
NRF_STATIC_INLINE bool nrf_vdetpof5v0_event_check (NRF_VDETPOF5V0_Type const *p_reg, nrf_vdetpof5v0_event_t event)
 Function for retrieving the state of the VDETPOF5V0 event.
 
NRF_STATIC_INLINE void nrf_vdetpof5v0_int_enable (NRF_VDETPOF5V0_Type *p_reg, uint32_t mask)
 Function for enabling specified interrupts.
 
NRF_STATIC_INLINE void nrf_vdetpof5v0_int_disable (NRF_VDETPOF5V0_Type *p_reg, uint32_t mask)
 Function for disabling specified interrupts.
 
NRF_STATIC_INLINE uint32_t nrf_vdetpof5v0_int_enable_check (NRF_VDETPOF5V0_Type const *p_reg, uint32_t mask)
 Function for checking if the specified interrupts are enabled.
 
NRF_STATIC_INLINE uint32_t nrf_vdetpof5v0_int_pending_get (NRF_VDETPOF5V0_Type const *p_reg)
 Function for retrieving the state of pending interrupts.
 
NRF_STATIC_INLINE nrf_vdetpof5v0_statusana_t nrf_vdetpof5v0_statusana_get (NRF_VDETPOF5V0_Type const *p_reg)
 Function for getting status of analog module output signals.
 
NRF_STATIC_INLINE nrf_vdetpof5v0_cfg_t nrf_vdetpof5v0_cfg_get (NRF_VDETPOF5V0_Type const *p_reg)
 Function for getting configuration of power-fail comparator.
 
NRF_STATIC_INLINE void nrf_vdetpof5v0_cfg_set (NRF_VDETPOF5V0_Type *p_reg, nrf_vdetpof5v0_cfg_t *p_cfg)
 Function for setting configuration of power-fail comparator.
 
NRF_STATIC_INLINE void nrf_vdetpof5v0_trim_pofwarn_set (NRF_VDETPOF5V0_Type *p_reg, uint32_t val)
 Function for setting voltage trimming value of power-fail comparator.
 
NRF_STATIC_INLINE uint32_t nrf_vdetpof5v0_trim_pofwarn_get (NRF_VDETPOF5V0_Type const *p_reg)
 Function for getting voltage trimming value of power-fail comparator.
 
NRF_STATIC_INLINE void nrf_vdetpof5v0_override_set (NRF_VDETPOF5V0_Type *p_reg, nrf_vdetpof5v0_analog_signal_t signal, bool enable, uint8_t val)
 Function for overriding signal to the analog module.
 
NRF_STATIC_INLINE void nrf_vdetpof5v0_dft_atb0_config_set (NRF_VDETPOF5V0_Type *p_reg, nrf_vdetpof5v0_dft_atb0_selmux_t selmux, bool enable)
 Function for configuring Analog Test Bus 0 (ATB0).
 
NRF_STATIC_INLINE void nrf_vdetpof5v0_dft_atb1_config_set (NRF_VDETPOF5V0_Type *p_reg, nrf_vdetpof5v0_dft_atb1_selmux_t selmux, bool enable)
 Function for configuring Analog Test Bus 1 (ATB1).
 
NRF_STATIC_INLINE void nrf_vdetpof5v0_dft_dtb0_config_set (NRF_VDETPOF5V0_Type *p_reg, nrf_vdetpof5v0_dft_dtb0_selmux_t selmux, bool enable)
 Function for configuring Digital Test Bus 0 (DTB0).
 
NRF_STATIC_INLINE void nrf_vdetpof5v0_dft_dtb1_config_set (NRF_VDETPOF5V0_Type *p_reg, nrf_vdetpof5v0_dft_dtb1_selmux_t selmux, bool enable)
 Function for configuring Digital Test Bus 1 (DTB1).
 
NRF_STATIC_INLINE void nrf_vdetpof5v0_dft_dtb3_config_set (NRF_VDETPOF5V0_Type *p_reg, bool enable)
 Function for configuring Digital Test Bus 3 (DTB3).
 

Detailed Description

Hardware access layer for managing the 5 V power-fail comparator (VDETPOF5V0).

Enumeration Type Documentation

◆ nrf_vdetpof5v0_analog_signal_t

Analog signal to be overridden.

Enumerator
NRF_VDETPOF5V0_ANALOG_SIGNAL_PWRUP 

Override PWRUP signal.

NRF_VDETPOF5V0_ANALOG_SIGNAL_RETAIN 

Override RETAIN signal.

NRF_VDETPOF5V0_ANALOG_SIGNAL_READY 

Override READY signal.

NRF_VDETPOF5V0_ANALOG_SIGNAL_SETTLED 

Override SETTLED signal.

NRF_VDETPOF5V0_ANALOG_SIGNAL_POFWARN 

Override POFWARN signal.

◆ nrf_vdetpof5v0_dft_atb0_selmux_t

Select multiplexer for ATB0.

Enumerator
NRF_VDETPOF5V0_DFT_ATB0_SELMUX_ATB0_SENSE 

ATB0 voltage for sensing instead of VDIV tap voltage.

NRF_VDETPOF5V0_DFT_ATB0_SELMUX_CONNECT_VSS 

Connect VSS to ATB0.

◆ nrf_vdetpof5v0_dft_atb1_selmux_t

Select multiplexer for ATB1.

Enumerator
NRF_VDETPOF5V0_DFT_ATB1_SELMUX_CONNECT_VREF 

Connect VREF to ATB1.

NRF_VDETPOF5V0_DFT_ATB1_SELMUX_CONNECT_VDIV 

Connect VDIV to ATB1.

◆ nrf_vdetpof5v0_dft_dtb0_selmux_t

Select multiplexer for DTB0.

Enumerator
NRF_VDETPOF5V0_DFT_DTB0_SELMUX_READY 

READY_POFAO5V0_AO_0V8.

NRF_VDETPOF5V0_DFT_DTB0_SELMUX_POFWARN 

POFAO5V0_WARN_AO_0V8.

◆ nrf_vdetpof5v0_dft_dtb1_selmux_t

Select multiplexer for DTB1.

Enumerator
NRF_VDETPOF5V0_DFT_DTB1_SELMUX_READYCMP 

POFAO5V0_READY_CMP_2DTB_0V8.

NRF_VDETPOF5V0_DFT_DTB1_SELMUX_SETTLED 

SETTLED_POFAO5V0_AO_0V8.

◆ nrf_vdetpof5v0_event_t

VDETPOF5V0 events.

Enumerator
NRF_VDETPOF5V0_EVENT_READY 

Power up done.

NRF_VDETPOF5V0_EVENT_SETTLED 

Settled flag for MODE handshake.

NRF_VDETPOF5V0_EVENT_POFWARN 

Power failure warning.

◆ nrf_vdetpof5v0_hyst_t

VDETPOF5V0 power-fail comparator hysteresis voltage.

Enumerator
NRF_VDETPOF5V0_HYST_0MV 

Hysteresis voltage is 0 mV.

NRF_VDETPOF5V0_HYST_25MV 

Hysteresis voltage is 25 mV.

NRF_VDETPOF5V0_HYST_50MV 

Hysteresis voltage is 50 mV.

NRF_VDETPOF5V0_HYST_100MV 

Hysteresis voltage is 100 mV.

◆ nrf_vdetpof5v0_int_mask_t

VDETPOF5V0 interrupt mask.

Enumerator
NRF_VDETPOF5V0_INT_READY_MASK 

Interrupt on READY event.

NRF_VDETPOF5V0_INT_SETTLED_MASK 

Interrupt on SETTLED event.

NRF_VDETPOF5V0_INT_POFWARN_MASK 

Interrupt on POFWARN event.

◆ nrf_vdetpof5v0_statusana_t

VDETPOF5V0 status of analog module output signals.

Enumerator
NRF_VDETPOF5V0_STATUSANA_READY 

Current value of READY signal.

NRF_VDETPOF5V0_STATUSANA_SETTLED 

Current value of SETTLED signal.

NRF_VDETPOF5V0_STATUSANA_POFWARN 

Current value of POFWARN signal.

◆ nrf_vdetpof5v0_task_t

VDETPOF5V0 tasks.

Enumerator
NRF_VDETPOF5V0_TASK_POWER_UP 

Power up voltage detector.

NRF_VDETPOF5V0_TASK_POWER_DOWN 

Power down voltage detector.

Function Documentation

◆ nrf_vdetpof5v0_cfg_get()

NRF_STATIC_INLINE nrf_vdetpof5v0_cfg_t nrf_vdetpof5v0_cfg_get ( NRF_VDETPOF5V0_Type const *  p_reg)

Function for getting configuration of power-fail comparator.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Hysteresis voltage of the power-fail comparator.

◆ nrf_vdetpof5v0_cfg_set()

NRF_STATIC_INLINE void nrf_vdetpof5v0_cfg_set ( NRF_VDETPOF5V0_Type *  p_reg,
nrf_vdetpof5v0_cfg_t p_cfg 
)

Function for setting configuration of power-fail comparator.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_cfgPointer to the configuration of the power-fail comparator.

◆ nrf_vdetpof5v0_dft_atb0_config_set()

NRF_STATIC_INLINE void nrf_vdetpof5v0_dft_atb0_config_set ( NRF_VDETPOF5V0_Type *  p_reg,
nrf_vdetpof5v0_dft_atb0_selmux_t  selmux,
bool  enable 
)

Function for configuring Analog Test Bus 0 (ATB0).

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]selmuxMultiplexer configuration.
[in]enableTrue to enable test bus.

◆ nrf_vdetpof5v0_dft_atb1_config_set()

NRF_STATIC_INLINE void nrf_vdetpof5v0_dft_atb1_config_set ( NRF_VDETPOF5V0_Type *  p_reg,
nrf_vdetpof5v0_dft_atb1_selmux_t  selmux,
bool  enable 
)

Function for configuring Analog Test Bus 1 (ATB1).

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]selmuxMultiplexer configuration.
[in]enableTrue to enable test bus.

◆ nrf_vdetpof5v0_dft_dtb0_config_set()

NRF_STATIC_INLINE void nrf_vdetpof5v0_dft_dtb0_config_set ( NRF_VDETPOF5V0_Type *  p_reg,
nrf_vdetpof5v0_dft_dtb0_selmux_t  selmux,
bool  enable 
)

Function for configuring Digital Test Bus 0 (DTB0).

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]selmuxMultiplexer configuration.
[in]enableTrue to enable test bus.

◆ nrf_vdetpof5v0_dft_dtb1_config_set()

NRF_STATIC_INLINE void nrf_vdetpof5v0_dft_dtb1_config_set ( NRF_VDETPOF5V0_Type *  p_reg,
nrf_vdetpof5v0_dft_dtb1_selmux_t  selmux,
bool  enable 
)

Function for configuring Digital Test Bus 1 (DTB1).

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]selmuxMultiplexer configuration.
[in]enableTrue to enable test bus.

◆ nrf_vdetpof5v0_dft_dtb3_config_set()

NRF_STATIC_INLINE void nrf_vdetpof5v0_dft_dtb3_config_set ( NRF_VDETPOF5V0_Type *  p_reg,
bool  enable 
)

Function for configuring Digital Test Bus 3 (DTB3).

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue to enable PWRUP delay test circuit.

◆ nrf_vdetpof5v0_event_address_get()

NRF_STATIC_INLINE uint32_t nrf_vdetpof5v0_event_address_get ( NRF_VDETPOF5V0_Type const *  p_reg,
nrf_vdetpof5v0_event_t  event 
)

Function for retrieving the address of the specified VDETPOF5V0 event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventThe specified event.
Returns
Address of the specified event register.

◆ nrf_vdetpof5v0_event_check()

NRF_STATIC_INLINE bool nrf_vdetpof5v0_event_check ( NRF_VDETPOF5V0_Type const *  p_reg,
nrf_vdetpof5v0_event_t  event 
)

Function for retrieving the state of the VDETPOF5V0 event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be checked.
Return values
trueThe event has been generated.
falseThe event has not been generated.

◆ nrf_vdetpof5v0_event_clear()

NRF_STATIC_INLINE void nrf_vdetpof5v0_event_clear ( NRF_VDETPOF5V0_Type *  p_reg,
nrf_vdetpof5v0_event_t  event 
)

Function for clearing the specified VDETPOF5V0 event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be cleared.

◆ nrf_vdetpof5v0_int_disable()

NRF_STATIC_INLINE void nrf_vdetpof5v0_int_disable ( NRF_VDETPOF5V0_Type *  p_reg,
uint32_t  mask 
)

Function for disabling specified interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be set. Use nrf_vdetpof5v0_int_mask_t values for bit masking.

◆ nrf_vdetpof5v0_int_enable()

NRF_STATIC_INLINE void nrf_vdetpof5v0_int_enable ( NRF_VDETPOF5V0_Type *  p_reg,
uint32_t  mask 
)

Function for enabling specified interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be set. Use nrf_vdetpof5v0_int_mask_t values for bit masking.

◆ nrf_vdetpof5v0_int_enable_check()

NRF_STATIC_INLINE uint32_t nrf_vdetpof5v0_int_enable_check ( NRF_VDETPOF5V0_Type const *  p_reg,
uint32_t  mask 
)

Function for checking if the specified interrupts are enabled.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be checked. Use nrf_vdetpof5v0_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrf_vdetpof5v0_int_pending_get()

NRF_STATIC_INLINE uint32_t nrf_vdetpof5v0_int_pending_get ( NRF_VDETPOF5V0_Type const *  p_reg)

Function for retrieving the state of pending interrupts.

Note
States of pending interrupt are saved as a bitmask. One set at particular position means that interrupt for event is pending.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Bitmask with information about pending interrupts. Use nrf_vdetpof5v0_int_mask_t values for bit masking.

◆ nrf_vdetpof5v0_override_set()

NRF_STATIC_INLINE void nrf_vdetpof5v0_override_set ( NRF_VDETPOF5V0_Type *  p_reg,
nrf_vdetpof5v0_analog_signal_t  signal,
bool  enable,
uint8_t  val 
)

Function for overriding signal to the analog module.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]signalSignal to be overridden.
[in]enableTrue to enable override, false to disable.
[in]valOverriden value.

◆ nrf_vdetpof5v0_statusana_get()

NRF_STATIC_INLINE nrf_vdetpof5v0_statusana_t nrf_vdetpof5v0_statusana_get ( NRF_VDETPOF5V0_Type const *  p_reg)

Function for getting status of analog module output signals.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Status of analog module output signal.

◆ nrf_vdetpof5v0_task_address_get()

NRF_STATIC_INLINE uint32_t nrf_vdetpof5v0_task_address_get ( NRF_VDETPOF5V0_Type const *  p_reg,
nrf_vdetpof5v0_task_t  task 
)

Function for retrieving the address of the specified VDETPOF5V0 task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskThe specified task.
Returns
Address of the specified task register.

◆ nrf_vdetpof5v0_task_trigger()

NRF_STATIC_INLINE void nrf_vdetpof5v0_task_trigger ( NRF_VDETPOF5V0_Type *  p_reg,
nrf_vdetpof5v0_task_t  task 
)

Function for triggering the specified VDETPOF5V0 task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask to be activated.

◆ nrf_vdetpof5v0_trim_pofwarn_get()

NRF_STATIC_INLINE uint32_t nrf_vdetpof5v0_trim_pofwarn_get ( NRF_VDETPOF5V0_Type const *  p_reg)

Function for getting voltage trimming value of power-fail comparator.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Threshold voltage trimming value. The value is 2's complement value of +0.67% +/- 1.34% steps.

◆ nrf_vdetpof5v0_trim_pofwarn_set()

NRF_STATIC_INLINE void nrf_vdetpof5v0_trim_pofwarn_set ( NRF_VDETPOF5V0_Type *  p_reg,
uint32_t  val 
)

Function for setting voltage trimming value of power-fail comparator.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]valThreshold voltage trimming value. The value is 2's complement value of +0.67% +/- 1.34% steps.

Documentation feedback | Developer Zone | Subscribe | Updated