nrfx 3.3
Data Structures | Enumerations | Functions
LFXO HAL

Hardware access layer for managing the Low Frequency Crystal Oscillator (LFXO). More...

Data Structures

struct  nrf_lfxo_status_t
 LFXO status. More...
 
struct  nrf_lfxo_amplitude_ctrl_t
 Amplitude control. More...
 

Enumerations

enum  nrf_lfxo_event_t {
  NRF_LFXO_EVENT_MODECHANGED = offsetof(NRF_LFXO_Type, EVENTS_MODECHANGED) ,
  NRF_LFXO_EVENT_ERRORSTARTING = offsetof(NRF_LFXO_Type, EVENTS_ERRORSTARTING) ,
  NRF_LFXO_EVENT_ERRORRUNNING = offsetof(NRF_LFXO_Type, EVENTS_ERRORRUNNING)
}
 LFXO events. More...
 
enum  nrf_lfxo_int_mask_t {
  NRF_LFXO_INT_MODECHANGED_MASK = LFXO_INTENSET_MODECHANGED_Msk ,
  NRF_LFXO_INT_ERRORSTARTING_MASK = LFXO_INTENSET_ERRORSTARTING_Msk ,
  NRF_LFXO_INT_ERRORRUNNING_MASK = LFXO_INTENSET_ERRORRUNNING_Msk
}
 LFXO interrupts. More...
 
enum  nrf_lfxo_oscillator_mode_t {
  NRF_LFXO_OSCILLATOR_MODE_PIERCE = LFXO_STATUS_MODE_Pierce ,
  NRF_LFXO_OSCILLATOR_MODE_PIXO = LFXO_STATUS_MODE_Pixo ,
  NRF_LFXO_OSCILLATOR_MODE_EXTSINE = LFXO_STATUS_MODE_ExternalSine ,
  NRF_LFXO_OSCILLATOR_MODE_EXTSQ = LFXO_STATUS_MODE_ExternalSquare
}
 LFXO modes. More...
 
enum  nrf_lfxo_power_control_t {
  NRF_LFXO_POWER_CONTROL_AUTO = LFXO_PWRUPCTRL_CTRL_Auto ,
  NRF_LFXO_POWER_CONTROL_POWER_UP = LFXO_PWRUPCTRL_CTRL_PowerUp ,
  NRF_LFXO_POWER_CONTROL_POWER_DOWN = LFXO_PWRUPCTRL_CTRL_PowerDown
}
 Power up control. More...
 

Functions

NRF_STATIC_INLINE uint32_t nrf_lfxo_event_address_get (NRF_LFXO_Type const *p_reg, nrf_lfxo_event_t event)
 Function for retrieving the address of the specified event.
 
NRF_STATIC_INLINE void nrf_lfxo_event_clear (NRF_LFXO_Type *p_reg, nrf_lfxo_event_t event)
 Function for clearing the specified event.
 
NRF_STATIC_INLINE bool nrf_lfxo_event_check (NRF_LFXO_Type const *p_reg, nrf_lfxo_event_t event)
 Function for retrieving the state of the specified event.
 
NRF_STATIC_INLINE void nrf_lfxo_int_enable (NRF_LFXO_Type *p_reg, uint32_t mask)
 Function for enabling the specified interrupt.
 
NRF_STATIC_INLINE void nrf_lfxo_int_disable (NRF_LFXO_Type *p_reg, uint32_t mask)
 Function for disabling the specified interrupt.
 
NRF_STATIC_INLINE uint32_t nrf_lfxo_int_enable_check (NRF_LFXO_Type const *p_reg, uint32_t mask)
 Function for checking if the specified interrupts are enabled.
 
NRF_STATIC_INLINE uint32_t nrf_lfxo_int_pending_get (NRF_LFXO_Type const *p_reg)
 Function for retrieving the state of pending interrupts.
 
NRF_STATIC_INLINE void nrf_lfxo_status_get (NRF_LFXO_Type const *p_reg, nrf_lfxo_status_t *p_status)
 Function for getting LFXO status.
 
NRF_STATIC_INLINE bool nrf_lfxo_statusana_ready_check (NRF_LFXO_Type const *p_reg)
 Function for checking status of analog module READY signal.
 
NRF_STATIC_INLINE bool nrf_lfxo_statusana_settled_check (NRF_LFXO_Type const *p_reg)
 Function for checking status of analog module SETTLED signal.
 
NRF_STATIC_INLINE uint8_t nrf_lfxo_cload_get (NRF_LFXO_Type const *p_reg)
 Function for getting internal capacitive load value.
 
NRF_STATIC_INLINE void nrf_lfxo_cload_set (NRF_LFXO_Type *p_reg, uint8_t cap)
 Function for setting internal capacitive load value.
 
NRF_STATIC_INLINE void nrf_lfxo_amplitude_control_get (NRF_LFXO_Type const *p_reg, nrf_lfxo_amplitude_ctrl_t *p_ctrl)
 Function for getting amplitude control configuration.
 
NRF_STATIC_INLINE void nrf_lfxo_amplitude_control_set (NRF_LFXO_Type *p_reg, nrf_lfxo_amplitude_ctrl_t *p_ctrl)
 Function for setting amplitude control configuration.
 
NRF_STATIC_INLINE void nrf_lfxo_power_control_set (NRF_LFXO_Type *p_reg, nrf_lfxo_power_control_t pwrctrl)
 Function for power control set.
 
NRF_STATIC_INLINE void nrf_lfxo_mode_set (NRF_LFXO_Type *p_reg, nrf_lfxo_oscillator_mode_t oscmode, bool hpmode)
 Function setting LFXO mode.
 

Detailed Description

Hardware access layer for managing the Low Frequency Crystal Oscillator (LFXO).

Enumeration Type Documentation

◆ nrf_lfxo_event_t

LFXO events.

Enumerator
NRF_LFXO_EVENT_MODECHANGED 

LFXO mode changed.

NRF_LFXO_EVENT_ERRORSTARTING 

Error while starting the LFXO in PIERCE mode.

NRF_LFXO_EVENT_ERRORRUNNING 

Error detected while LFXO was running.

◆ nrf_lfxo_int_mask_t

LFXO interrupts.

Enumerator
NRF_LFXO_INT_MODECHANGED_MASK 

Interrupt on MODECHANGED event.

NRF_LFXO_INT_ERRORSTARTING_MASK 

Interrupt on ERRORSTARTING event.

NRF_LFXO_INT_ERRORRUNNING_MASK 

Interrupt on ERRORRUNNING event.

◆ nrf_lfxo_oscillator_mode_t

LFXO modes.

Enumerator
NRF_LFXO_OSCILLATOR_MODE_PIERCE 

Pierce mode.

NRF_LFXO_OSCILLATOR_MODE_PIXO 

PIXO mode.

NRF_LFXO_OSCILLATOR_MODE_EXTSINE 

External sine wave clock.

NRF_LFXO_OSCILLATOR_MODE_EXTSQ 

External square wave clock.

◆ nrf_lfxo_power_control_t

Power up control.

Enumerator
NRF_LFXO_POWER_CONTROL_AUTO 

Automatically handled by the peripheral.

NRF_LFXO_POWER_CONTROL_POWER_UP 

Power up.

NRF_LFXO_POWER_CONTROL_POWER_DOWN 

Power down.

Function Documentation

◆ nrf_lfxo_amplitude_control_get()

NRF_STATIC_INLINE void nrf_lfxo_amplitude_control_get ( NRF_LFXO_Type const *  p_reg,
nrf_lfxo_amplitude_ctrl_t p_ctrl 
)

Function for getting amplitude control configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_ctrlPointer to the structure to be filled with amplitude control configuration.

◆ nrf_lfxo_amplitude_control_set()

NRF_STATIC_INLINE void nrf_lfxo_amplitude_control_set ( NRF_LFXO_Type *  p_reg,
nrf_lfxo_amplitude_ctrl_t p_ctrl 
)

Function for setting amplitude control configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_ctrlPointer to the structure with amplitude control configuration.

◆ nrf_lfxo_cload_get()

NRF_STATIC_INLINE uint8_t nrf_lfxo_cload_get ( NRF_LFXO_Type const *  p_reg)

Function for getting internal capacitive load value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Total capacitance in pF.

◆ nrf_lfxo_cload_set()

NRF_STATIC_INLINE void nrf_lfxo_cload_set ( NRF_LFXO_Type *  p_reg,
uint8_t  cap 
)

Function for setting internal capacitive load value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]capTotal capacitance in pF.

◆ nrf_lfxo_event_address_get()

NRF_STATIC_INLINE uint32_t nrf_lfxo_event_address_get ( NRF_LFXO_Type const *  p_reg,
nrf_lfxo_event_t  event 
)

Function for retrieving the address of the specified event.

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

◆ nrf_lfxo_event_check()

NRF_STATIC_INLINE bool nrf_lfxo_event_check ( NRF_LFXO_Type const *  p_reg,
nrf_lfxo_event_t  event 
)

Function for retrieving the state of the specified 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_lfxo_event_clear()

NRF_STATIC_INLINE void nrf_lfxo_event_clear ( NRF_LFXO_Type *  p_reg,
nrf_lfxo_event_t  event 
)

Function for clearing the specified event.

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

◆ nrf_lfxo_int_disable()

NRF_STATIC_INLINE void nrf_lfxo_int_disable ( NRF_LFXO_Type *  p_reg,
uint32_t  mask 
)

Function for disabling the specified interrupt.

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

◆ nrf_lfxo_int_enable()

NRF_STATIC_INLINE void nrf_lfxo_int_enable ( NRF_LFXO_Type *  p_reg,
uint32_t  mask 
)

Function for enabling the specified interrupt.

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

◆ nrf_lfxo_int_enable_check()

NRF_STATIC_INLINE uint32_t nrf_lfxo_int_enable_check ( NRF_LFXO_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_lfxo_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrf_lfxo_int_pending_get()

NRF_STATIC_INLINE uint32_t nrf_lfxo_int_pending_get ( NRF_LFXO_Type const *  p_reg)

Function for retrieving the state of pending interrupts.

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_lfxo_int_mask_t values for bit masking.

◆ nrf_lfxo_mode_set()

NRF_STATIC_INLINE void nrf_lfxo_mode_set ( NRF_LFXO_Type *  p_reg,
nrf_lfxo_oscillator_mode_t  oscmode,
bool  hpmode 
)

Function setting LFXO mode.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]oscmodeOscillator mode.
[in]hpmodeHigh performance mode enable.

◆ nrf_lfxo_power_control_set()

NRF_STATIC_INLINE void nrf_lfxo_power_control_set ( NRF_LFXO_Type *  p_reg,
nrf_lfxo_power_control_t  pwrctrl 
)

Function for power control set.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]pwrctrlPower up control.

◆ nrf_lfxo_status_get()

NRF_STATIC_INLINE void nrf_lfxo_status_get ( NRF_LFXO_Type const *  p_reg,
nrf_lfxo_status_t p_status 
)

Function for getting LFXO status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_statusPointer to the structure to be filled with LFXO status.

◆ nrf_lfxo_statusana_ready_check()

NRF_STATIC_INLINE bool nrf_lfxo_statusana_ready_check ( NRF_LFXO_Type const *  p_reg)

Function for checking status of analog module READY signal.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueThe signal is logic 1.
falseThe signal is logic 0.

◆ nrf_lfxo_statusana_settled_check()

NRF_STATIC_INLINE bool nrf_lfxo_statusana_settled_check ( NRF_LFXO_Type const *  p_reg)

Function for checking status of analog module SETTLED signal.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueThe signal is logic 1.
falseThe signal is logic 0.

Documentation feedback | Developer Zone | Subscribe | Updated