nrfx 2.5
Enumerations | Functions
OSCILLATORS HAL

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

Enumerations

enum  nrf_oscillators_lfxo_cap_t {
  NRF_OSCILLATORS_LFXO_CAP_EXTERNAL = OSCILLATORS_XOSC32KI_INTCAP_INTCAP_External,
  NRF_OSCILLATORS_LFXO_CAP_6PF = OSCILLATORS_XOSC32KI_INTCAP_INTCAP_C6PF,
  NRF_OSCILLATORS_LFXO_CAP_7PF = OSCILLATORS_XOSC32KI_INTCAP_INTCAP_C7PF,
  NRF_OSCILLATORS_LFXO_CAP_9PF = OSCILLATORS_XOSC32KI_INTCAP_INTCAP_C9PF
}
 Capacitors configuration for LFXO. More...
 

Functions

NRF_STATIC_INLINE void nrf_oscillators_lfxo_bypass_set (NRF_OSCILLATORS_Type *p_reg, bool enable)
 Function for enabling or disabling the bypass of LFXO with external clock source. More...
 
NRF_STATIC_INLINE void nrf_oscillators_lfxo_cap_set (NRF_OSCILLATORS_Type *p_reg, nrf_oscillators_lfxo_cap_t cap)
 Function for configuring the internal capacitors of LFXO. More...
 
NRF_STATIC_INLINE void nrf_oscillators_hfxo_cap_set (NRF_OSCILLATORS_Type *p_reg, bool enable, uint32_t cap_value)
 Function for configuring the internal capacitors of HXFO. More...
 

Detailed Description

Hardware access layer for managing the OSCILLATORS peripheral.

Enumeration Type Documentation

◆ nrf_oscillators_lfxo_cap_t

Capacitors configuration for LFXO.

Enumerator
NRF_OSCILLATORS_LFXO_CAP_EXTERNAL 

Use external capacitors.

NRF_OSCILLATORS_LFXO_CAP_6PF 

Use 6 pF internal capacitors.

NRF_OSCILLATORS_LFXO_CAP_7PF 

Use 7 pF internal capacitors.

NRF_OSCILLATORS_LFXO_CAP_9PF 

Use 9 pF internal capacitors.

Function Documentation

◆ nrf_oscillators_hfxo_cap_set()

NRF_STATIC_INLINE void nrf_oscillators_hfxo_cap_set ( NRF_OSCILLATORS_Type *  p_reg,
bool  enable,
uint32_t  cap_value 
)

Function for configuring the internal capacitors of HXFO.

The capacitance of internal capacitors ranges from 7 pF to 20 pF in 0.5 pF steps. To calculate the correct cap_value, use the following equation: CAPVALUE = (1+FICR->XOSC32MTRIM.SLOPE/16) * (CAPACITANCE*2-14) + FICR->XOSC32MTRIM.OFFSET

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if internal capacitors are to be enabled, false otherwise.
[in]cap_valueValue representing capacitance, calculated using provided equation. Ignored when internal capacitors are disabled.

◆ nrf_oscillators_lfxo_bypass_set()

NRF_STATIC_INLINE void nrf_oscillators_lfxo_bypass_set ( NRF_OSCILLATORS_Type *  p_reg,
bool  enable 
)

Function for enabling or disabling the bypass of LFXO with external clock source.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if bypass is to be enabled (use with rail-to-rail external source). False if bypass is to be disabled (use with xtal or low-swing external source).

◆ nrf_oscillators_lfxo_cap_set()

NRF_STATIC_INLINE void nrf_oscillators_lfxo_cap_set ( NRF_OSCILLATORS_Type *  p_reg,
nrf_oscillators_lfxo_cap_t  cap 
)

Function for configuring the internal capacitors of LFXO.

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

Documentation feedback | Developer Zone | Subscribe | Updated