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... | |
Hardware access layer for managing the OSCILLATORS peripheral.
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
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | enable | True if internal capacitors are to be enabled, false otherwise. |
[in] | cap_value | Value representing capacitance, calculated using provided equation. Ignored when internal capacitors are disabled. |
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.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | enable | 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.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | cap | Capacitors configuration. |