OSCILLATORS HAL¶
-
group
nrf_oscillators_hal
Hardware access layer for managing the OSCILLATORS peripheral.
Enums
-
enum
nrf_oscillators_lfxo_cap_t
¶ Capacitors configuration for LFXO.
Values:
-
enumerator
NRF_OSCILLATORS_LFXO_CAP_EXTERNAL
¶ Use external capacitors.
-
enumerator
NRF_OSCILLATORS_LFXO_CAP_6PF
¶ Use 6 pF internal capacitors.
-
enumerator
NRF_OSCILLATORS_LFXO_CAP_7PF
¶ Use 7 pF internal capacitors.
-
enumerator
NRF_OSCILLATORS_LFXO_CAP_9PF
¶ Use 9 pF internal capacitors.
-
enumerator
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.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
enable – [in] True 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_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
p_reg – [in] Pointer to the structure of registers of the peripheral.
cap – [in] Capacitors configuration.
-
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
p_reg – [in] Pointer to the structure of registers of the peripheral.
enable – [in] True if internal capacitors are to be enabled, false otherwise.
cap_value – [in] Value representing capacitance, calculated using provided equation. Ignored when internal capacitors are disabled.
-
enum