nrfx 3.3
Data Structures | Macros | Enumerations | Functions
OSCRFR HAL

Hardware access layer for managing the Oscillator for Refresh (OSCRFR). More...

Data Structures

struct  nrf_oscrfr_config_static_t
 Fields for static configuration structure. More...
 
struct  nrf_oscrfr_tcfg_t
 Test mode configuration. More...
 

Macros

#define NRF_OSCRFR_HAS_STATUS   1
 Symbol indicating whether STATUS register is present.
 
#define NRF_OSCRFR_HAS_MODE_AUTO   1
 Symbol indicating whether Oscillator Auto mode is present.
 
#define NRF_OSCRFR_HAS_OVERRIDE_MODE   1
 Symbol indicating whether overriding the MODE signal is available.
 
#define NRF_OSCRFR_HAS_DFT_ATB0_SELMUX_IBPP_50NA   1
 Symbol indicating whether selecting the IBPP_50N signal for Analog Test Bus 0 multiplexer is available.
 
#define NRF_OSCRFR_HAS_DFT_ATB0_SELMUX_SPARE   1
 Symbol indicating whether selecting the SPARE signal for Analog Test Bus 0 multiplexer is available.
 

Enumerations

enum  nrf_oscrfr_status_t {
  NRF_OSCRFR_STATUS_NORMAL = OSCRFR_STATUS_MODE_Normal ,
  NRF_OSCRFR_STATUS_BYPASS = OSCRFR_STATUS_MODE_Bypass
}
 STATUS register states. More...
 
enum  nrf_oscrfr_statusana_mask_t {
  NRF_OSCRFR_STATUSANA_READY_MASK = OSCRFR_STATUSANA_READY_Msk ,
  NRF_OSCRFR_STATUSANA_SETTLED_MASK = OSCRFR_STATUSANA_SETTLED_Msk
}
 STATUSANA register bit masks. More...
 
enum  nrf_oscrfr_mode_t {
  NRF_OSCRFR_MODE_AUTO = OSCRFR_MODE_MODE_Auto ,
  NRF_OSCRFR_MODE_NORMAL = OSCRFR_MODE_MODE_Normal ,
  NRF_OSCRFR_MODE_BYPASS = OSCRFR_MODE_MODE_Bypass
}
 Oscillator modes. More...
 
enum  nrf_oscrfr_analog_signal_t {
  NRF_OSCRFR_ANALOG_SIGNAL_PWRUP ,
  NRF_OSCRFR_ANALOG_SIGNAL_RETAIN ,
  NRF_OSCRFR_ANALOG_SIGNAL_MODE ,
  NRF_OSCRFR_ANALOG_SIGNAL_READY ,
  NRF_OSCRFR_ANALOG_SIGNAL_SETTLED
}
 Analog signal to be overridden. More...
 
enum  nrf_oscrfr_dft_atb0_selmux_t {
  NRF_OSCRFR_DFT_ATB0_SELMUX_IBPSR_4UA = OSCRFR_DFT_ATB0CONFIG_SELMUX_IBPSR4U ,
  NRF_OSCRFR_DFT_ATB0_SELMUX_IBPP_50NA = OSCRFR_DFT_ATB0CONFIG_SELMUX_IBPP50N ,
  NRF_OSCRFR_DFT_ATB0_SELMUX_SPARE = OSCRFR_DFT_ATB0CONFIG_SELMUX_Spare
}
 Select multiplexer for ATB0. More...
 
enum  nrf_oscrfr_dft_dtb0_selmux_t {
  NRF_OSCRFR_DFT_DTB0_SELMUX_READY = OSCRFR_DFT_DTB0CONFIG_SELMUX_READY ,
  NRF_OSCRFR_DFT_DTB0_SELMUX_OSC = OSCRFR_DFT_DTB0CONFIG_SELMUX_OSC
}
 Select multiplexer for DTB0. More...
 
enum  nrf_oscrfr_dft_dtb1_selmux_t {
  NRF_OSCRFR_DFT_DTB1_SELMUX_SETTLED = OSCRFR_DFT_DTB1CONFIG_SELMUX_SETTLED ,
  NRF_OSCRFR_DFT_DTB1_SELMUX_OSC = OSCRFR_DFT_DTB1CONFIG_SELMUX_OSC
}
 Select multiplexer for DTB1. More...
 
enum  nrf_oscrfr_trim_osc_t {
  NRF_OSCRFR_TRIM_OSC_NORMAL = OSCRFR_TRIM_OSC_VAL_Normal ,
  NRF_OSCRFR_TRIM_OSC_35 = OSCRFR_TRIM_OSC_VAL_Val35 ,
  NRF_OSCRFR_TRIM_OSC_154 = OSCRFR_TRIM_OSC_VAL_Val154 ,
  NRF_OSCRFR_TRIM_OSC_670 = OSCRFR_TRIM_OSC_VAL_Val670 ,
  NRF_OSCRFR_TRIM_OSC_NEG_54 = OSCRFR_TRIM_OSC_VAL_ValNeg54 ,
  NRF_OSCRFR_TRIM_OSC_NEG_49 = OSCRFR_TRIM_OSC_VAL_ValNeg49 ,
  NRF_OSCRFR_TRIM_OSC_NEG_37 = OSCRFR_TRIM_OSC_VAL_ValNeg37 ,
  NRF_OSCRFR_TRIM_OSC_NEG_26 = OSCRFR_TRIM_OSC_VAL_ValNeg26
}
 Values for oscillation period trimming. More...
 

Functions

NRF_STATIC_INLINE nrf_oscrfr_status_t nrf_oscrfr_status_get (NRF_OSCRFR_Type const *p_reg)
 Function for getting OSCRFR status register.
 
NRF_STATIC_INLINE uint32_t nrf_oscrfr_statusana_get (NRF_OSCRFR_Type const *p_reg)
 Function for getting OSCRFR status of the analog module output signals.
 
NRF_STATIC_INLINE void nrf_oscrfr_config_static_set (NRF_OSCRFR_Type *p_reg, nrf_oscrfr_config_static_t cfg)
 Function for setting configuration of the static OSCRFR oscillator.
 
NRF_STATIC_INLINE nrf_oscrfr_config_static_t nrf_oscrfr_config_static_get (NRF_OSCRFR_Type const *p_reg)
 Function for getting configuration of the static OSCRFR oscillator.
 
NRF_STATIC_INLINE void nrf_oscrfr_trim_osc_set (NRF_OSCRFR_Type *p_reg, nrf_oscrfr_trim_osc_t val)
 Function for setting oscillation period trimming value.
 
NRF_STATIC_INLINE nrf_oscrfr_trim_osc_t nrf_oscrfr_trim_osc_get (NRF_OSCRFR_Type const *p_reg)
 Function for getting oscillation period trimming value.
 
NRF_STATIC_INLINE void nrf_oscrfr_trim_ibpsr_vref_set (NRF_OSCRFR_Type *p_reg, uint8_t val)
 Function for setting IBPSR current and VREF voltage trimming value.
 
NRF_STATIC_INLINE uint8_t nrf_oscrfr_trim_ibpsr_vref_get (NRF_OSCRFR_Type const *p_reg)
 Function for getting IBPSR current and VREF voltage trimming value.
 
NRF_STATIC_INLINE void nrf_oscrfr_mirror_lock_set (NRF_OSCRFR_Type *p_reg, bool lock)
 Function for locking mirrored registers.
 
NRF_STATIC_INLINE void nrf_oscrfr_mode_set (NRF_OSCRFR_Type *p_reg, nrf_oscrfr_mode_t mode)
 Function for setting mode of the OSCRFR oscillator.
 
NRF_STATIC_INLINE nrf_oscrfr_mode_t nrf_oscrfr_mode_get (NRF_OSCRFR_Type const *p_reg)
 Function for getting mode of the OSCRFR oscillator.
 
NRF_STATIC_INLINE void nrf_oscrfr_override_set (NRF_OSCRFR_Type *p_reg, nrf_oscrfr_analog_signal_t signal, bool enable, uint8_t val)
 Function for overriding signal to the analog module.
 
NRF_STATIC_INLINE void nrf_oscrfr_dft_atb0_config_set (NRF_OSCRFR_Type *p_reg, nrf_oscrfr_dft_atb0_selmux_t selmux, bool enable)
 Function for configuring Analog Test Bus 0 (ATB0).
 
NRF_STATIC_INLINE void nrf_oscrfr_dft_dtb0_config_set (NRF_OSCRFR_Type *p_reg, nrf_oscrfr_dft_dtb0_selmux_t selmux, bool enable)
 Function for configuring Digital Test Bus 0 (DTB0).
 
NRF_STATIC_INLINE void nrf_oscrfr_dft_dtb1_config_set (NRF_OSCRFR_Type *p_reg, nrf_oscrfr_dft_dtb1_selmux_t selmux, bool enable)
 Function for configuring Digital Test Bus 1 (DTB1).
 
NRF_STATIC_INLINE void nrf_oscrfr_dft_dtb3_config_set (NRF_OSCRFR_Type *p_reg, bool enable)
 Function for configuring Digital Test Bus 3 (DTB3).
 
NRF_STATIC_INLINE void nrf_oscrfr_dft_tcfg_config_set (NRF_OSCRFR_Type *p_reg, nrf_oscrfr_tcfg_t tcfg)
 Function for configuring test mode.
 

Detailed Description

Hardware access layer for managing the Oscillator for Refresh (OSCRFR).

Enumeration Type Documentation

◆ nrf_oscrfr_analog_signal_t

Analog signal to be overridden.

Enumerator
NRF_OSCRFR_ANALOG_SIGNAL_PWRUP 

Override PWRUP signal.

NRF_OSCRFR_ANALOG_SIGNAL_RETAIN 

Override RETAIN signal.

NRF_OSCRFR_ANALOG_SIGNAL_MODE 

Override MODE signal.

NRF_OSCRFR_ANALOG_SIGNAL_READY 

Override READY signal.

NRF_OSCRFR_ANALOG_SIGNAL_SETTLED 

Override SETTLED signal.

◆ nrf_oscrfr_dft_atb0_selmux_t

Select multiplexer for ATB0.

Enumerator
NRF_OSCRFR_DFT_ATB0_SELMUX_IBPSR_4UA 

IBPSR_4U signal selected.

NRF_OSCRFR_DFT_ATB0_SELMUX_IBPP_50NA 

IBPP_50N signal selected.

NRF_OSCRFR_DFT_ATB0_SELMUX_SPARE 

None selected, logic 0.

◆ nrf_oscrfr_dft_dtb0_selmux_t

Select multiplexer for DTB0.

Enumerator
NRF_OSCRFR_DFT_DTB0_SELMUX_READY 

READY signal selected.

NRF_OSCRFR_DFT_DTB0_SELMUX_OSC 

OSC_RFR_ANA_AO_0V8 signal selected.

◆ nrf_oscrfr_dft_dtb1_selmux_t

Select multiplexer for DTB1.

Enumerator
NRF_OSCRFR_DFT_DTB1_SELMUX_SETTLED 

SETTLED signal selected.

NRF_OSCRFR_DFT_DTB1_SELMUX_OSC 

OSC_RFR_ANA_AO_0V8 signal selected.

◆ nrf_oscrfr_mode_t

Oscillator modes.

Enumerator
NRF_OSCRFR_MODE_AUTO 

Automatically handled by the peripheral.

NRF_OSCRFR_MODE_NORMAL 

Normal mode - use internal oscillator.

NRF_OSCRFR_MODE_BYPASS 

Bypass mode - use OSC_RFR_DIG_AO_0V8 signal.

◆ nrf_oscrfr_status_t

STATUS register states.

Enumerator
NRF_OSCRFR_STATUS_NORMAL 

Normal mode.

NRF_OSCRFR_STATUS_BYPASS 

Bypass mode.

◆ nrf_oscrfr_statusana_mask_t

STATUSANA register bit masks.

Enumerator
NRF_OSCRFR_STATUSANA_READY_MASK 

Current value of the READY signal from the analog module.

NRF_OSCRFR_STATUSANA_SETTLED_MASK 

Current value of the SETTLED signal from the analog module.

◆ nrf_oscrfr_trim_osc_t

Values for oscillation period trimming.

Enumerator
NRF_OSCRFR_TRIM_OSC_NORMAL 

Normal trim value.

NRF_OSCRFR_TRIM_OSC_35 

The trim value is 35%.

NRF_OSCRFR_TRIM_OSC_154 

The trim value is 154%.

NRF_OSCRFR_TRIM_OSC_670 

The trim value is 670%.

NRF_OSCRFR_TRIM_OSC_NEG_54 

The trim value is -54%.

NRF_OSCRFR_TRIM_OSC_NEG_49 

The trim value is -49%.

NRF_OSCRFR_TRIM_OSC_NEG_37 

The trim value is -37%.

NRF_OSCRFR_TRIM_OSC_NEG_26 

The trim value is -26%.

Function Documentation

◆ nrf_oscrfr_config_static_get()

NRF_STATIC_INLINE nrf_oscrfr_config_static_t nrf_oscrfr_config_static_get ( NRF_OSCRFR_Type const *  p_reg)

Function for getting configuration of the static OSCRFR oscillator.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Static configuration.

◆ nrf_oscrfr_config_static_set()

NRF_STATIC_INLINE void nrf_oscrfr_config_static_set ( NRF_OSCRFR_Type *  p_reg,
nrf_oscrfr_config_static_t  cfg 
)

Function for setting configuration of the static OSCRFR oscillator.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cfgStatic configuration.

◆ nrf_oscrfr_dft_atb0_config_set()

NRF_STATIC_INLINE void nrf_oscrfr_dft_atb0_config_set ( NRF_OSCRFR_Type *  p_reg,
nrf_oscrfr_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, false to disable.

◆ nrf_oscrfr_dft_dtb0_config_set()

NRF_STATIC_INLINE void nrf_oscrfr_dft_dtb0_config_set ( NRF_OSCRFR_Type *  p_reg,
nrf_oscrfr_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, false to disable.

◆ nrf_oscrfr_dft_dtb1_config_set()

NRF_STATIC_INLINE void nrf_oscrfr_dft_dtb1_config_set ( NRF_OSCRFR_Type *  p_reg,
nrf_oscrfr_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, false to disable.

◆ nrf_oscrfr_dft_dtb3_config_set()

NRF_STATIC_INLINE void nrf_oscrfr_dft_dtb3_config_set ( NRF_OSCRFR_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, false to disable.

◆ nrf_oscrfr_dft_tcfg_config_set()

NRF_STATIC_INLINE void nrf_oscrfr_dft_tcfg_config_set ( NRF_OSCRFR_Type *  p_reg,
nrf_oscrfr_tcfg_t  tcfg 
)

Function for configuring test mode.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]tcfgTest mode configuration.

◆ nrf_oscrfr_mirror_lock_set()

NRF_STATIC_INLINE void nrf_oscrfr_mirror_lock_set ( NRF_OSCRFR_Type *  p_reg,
bool  lock 
)

Function for locking mirrored registers.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]lockTrue if lock is enabled. False if lock is disabled, so mirrored registers can be updated at any time.

◆ nrf_oscrfr_mode_get()

NRF_STATIC_INLINE nrf_oscrfr_mode_t nrf_oscrfr_mode_get ( NRF_OSCRFR_Type const *  p_reg)

Function for getting mode of the OSCRFR oscillator.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Mode.

◆ nrf_oscrfr_mode_set()

NRF_STATIC_INLINE void nrf_oscrfr_mode_set ( NRF_OSCRFR_Type *  p_reg,
nrf_oscrfr_mode_t  mode 
)

Function for setting mode of the OSCRFR oscillator.

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

◆ nrf_oscrfr_override_set()

NRF_STATIC_INLINE void nrf_oscrfr_override_set ( NRF_OSCRFR_Type *  p_reg,
nrf_oscrfr_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_oscrfr_status_get()

NRF_STATIC_INLINE nrf_oscrfr_status_t nrf_oscrfr_status_get ( NRF_OSCRFR_Type const *  p_reg)

Function for getting OSCRFR status register.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The STATUS register value.

◆ nrf_oscrfr_statusana_get()

NRF_STATIC_INLINE uint32_t nrf_oscrfr_statusana_get ( NRF_OSCRFR_Type const *  p_reg)

Function for getting OSCRFR status of the analog module output signals.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
STATUSANA register value. Use nrf_oscrfr_statusana_mask_t values for bit masking.

◆ nrf_oscrfr_trim_ibpsr_vref_get()

NRF_STATIC_INLINE uint8_t nrf_oscrfr_trim_ibpsr_vref_get ( NRF_OSCRFR_Type const *  p_reg)

Function for getting IBPSR current and VREF voltage trimming value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
IBPSR current and VREF voltage trimming value. The value is 2's complement value from -31% to 65% (non-linear steps).

◆ nrf_oscrfr_trim_ibpsr_vref_set()

NRF_STATIC_INLINE void nrf_oscrfr_trim_ibpsr_vref_set ( NRF_OSCRFR_Type *  p_reg,
uint8_t  val 
)

Function for setting IBPSR current and VREF voltage trimming value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]valIBPSR current and VREF voltage trimming value. The value is 2's complement value from -31% to 65% (non-linear steps).

◆ nrf_oscrfr_trim_osc_get()

NRF_STATIC_INLINE nrf_oscrfr_trim_osc_t nrf_oscrfr_trim_osc_get ( NRF_OSCRFR_Type const *  p_reg)

Function for getting oscillation period trimming value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Oscillation period trimming value.

◆ nrf_oscrfr_trim_osc_set()

NRF_STATIC_INLINE void nrf_oscrfr_trim_osc_set ( NRF_OSCRFR_Type *  p_reg,
nrf_oscrfr_trim_osc_t  val 
)

Function for setting oscillation period trimming value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]valOscillation period trimming value.

Documentation feedback | Developer Zone | Subscribe | Updated