Hardware access layer for managing the 16 MHz Frequency Locked Loop (FLL16M) peripheral. More...
Data Structures | |
struct | nrf_fll16m_clockstatus_t |
Clock status. More... | |
struct | nrf_fll16m_clockctrl_t |
Clock control. More... | |
struct | nrf_fll16m_dithering_t |
Clock dithering configuration. More... | |
struct | nrf_fll16m_sleep_t |
Sleep configuration. More... | |
struct | nrf_fll16m_refclock_t |
Reference clock configuration. More... | |
Enumerations | |
enum | nrf_fll16m_task_t { NRF_FLL16M_TASK_ONESHOTLOCK = offsetof(NRF_FLL16M_Type, TASKS_ONESHOTLOCK) , NRF_FLL16M_TASK_SLEEP = offsetof(NRF_FLL16M_Type, TASKS_SLEEP) , NRF_FLL16M_TASK_FREQMEAS = offsetof(NRF_FLL16M_Type, TASKS_FREQMEAS) , NRF_FLL16M_TASK_FREQCHANGE = offsetof(NRF_FLL16M_Type, TASKS_FREQCHANGE) } |
FLL16M tasks. More... | |
enum | nrf_fll16m_event_t { NRF_FLL16M_EVENT_FREQMDONE = offsetof(NRF_FLL16M_Type, EVENTS_FREQMDONE) , NRF_FLL16M_EVENT_FREQMERROR = offsetof(NRF_FLL16M_Type, EVENTS_FREQMERROR) , NRF_FLL16M_EVENT_FREQCHANGED = offsetof(NRF_FLL16M_Type, EVENTS_FREQCHANGED) } |
FLL16M events. More... | |
enum | nrf_fll16m_int_mask_t { NRF_FLL16M_INT_FREQMDONE_MASK = FLL16M_INTENSET_FREQMDONE_Msk , NRF_FLL16M_INT_FREQMERROR_MASK = FLL16M_INTENSET_FREQMERROR_Msk , NRF_FLL16M_INT_FREQCHANGED_MASK = FLL16M_INTENSET_FREQCHANGED_Msk } |
FLL16M interrupts. More... | |
enum | nrf_fll16m_mode_t { NRF_FLL16M_MODE_AUTO = FLL16M_CLOCKSTATUS_MODE_Auto , NRF_FLL16M_MODE_OPENLOOP = FLL16M_CLOCKSTATUS_MODE_OpenLoop , NRF_FLL16M_MODE_CLOSEDLOOP = FLL16M_CLOCKSTATUS_MODE_ClosedLoop , NRF_FLL16M_MODE_REFRESH = FLL16M_CLOCKSTATUS_MODE_Refresh , NRF_FLL16M_MODE_BYPASS = FLL16M_CLOCKSTATUS_MODE_Bypass } |
FLL16M operating mode. More... | |
enum | nrf_fll16m_clocksel_t { NRF_FLL16M_CLOCKSEL_DCO16M = FLL16M_CLOCKSTATUS_CLOCKSEL_DCO16M , NRF_FLL16M_CLOCKSEL_HFXO = FLL16M_CLOCKSTATUS_CLOCKSEL_HFXO } |
Clock selection. More... | |
enum | nrf_fll16m_freqmeas_clocksel_t { NRF_FLL16M_FREQMEAS_CLOCKSEL_DCO16M = FLL16M_FREQM_CLOCKSEL_CLOCKSEL_DCO16M , NRF_FLL16M_FREQMEAS_CLOCKSEL_CKSW16M = FLL16M_FREQM_CLOCKSEL_CLOCKSEL_CKSW16M , NRF_FLL16M_FREQMEAS_CLOCKSEL_HFXOBY2 = FLL16M_FREQM_CLOCKSEL_CLOCKSEL_HFXOBy2 , NRF_FLL16M_FREQMEAS_CLOCKSEL_CKSW16MTESTOSC = FLL16M_FREQM_CLOCKSEL_CLOCKSEL_CKSW16MTestOsc } |
Clock selection for the frequency measurement. More... | |
enum | nrf_fll16m_refclock_select_t { NRF_FLL16M_REFCLOCK_SELECT_CLOCK32KHZ = FLL16M_CLOCKCTRL_REFCLOCK_SELREF_Clock32Ki , NRF_FLL16M_REFCLOCK_SELECT_CLOCK16MHZ = FLL16M_CLOCKCTRL_REFCLOCK_SELREF_Clock16M } |
Selection for the reference clock signal in software controlled mode. More... | |
Functions | |
NRF_STATIC_INLINE uint32_t | nrf_fll16m_task_address_get (NRF_FLL16M_Type const *p_reg, nrf_fll16m_task_t task) |
Function for retrieving the address of the specified task. | |
NRF_STATIC_INLINE void | nrf_fll16m_task_trigger (NRF_FLL16M_Type *p_reg, nrf_fll16m_task_t task) |
Function for triggering the specified task. | |
NRF_STATIC_INLINE uint32_t | nrf_fll16m_event_address_get (NRF_FLL16M_Type const *p_reg, nrf_fll16m_event_t event) |
Function for retrieving the address of the specified event. | |
NRF_STATIC_INLINE void | nrf_fll16m_event_clear (NRF_FLL16M_Type *p_reg, nrf_fll16m_event_t event) |
Function for clearing the specified event. | |
NRF_STATIC_INLINE bool | nrf_fll16m_event_check (NRF_FLL16M_Type const *p_reg, nrf_fll16m_event_t event) |
Function for retrieving the state of the specified event. | |
NRF_STATIC_INLINE void | nrf_fll16m_int_enable (NRF_FLL16M_Type *p_reg, uint32_t mask) |
Function for enabling the specified interrupt. | |
NRF_STATIC_INLINE void | nrf_fll16m_int_disable (NRF_FLL16M_Type *p_reg, uint32_t mask) |
Function for disabling the specified interrupt. | |
NRF_STATIC_INLINE uint32_t | nrf_fll16m_int_enable_check (NRF_FLL16M_Type const *p_reg, uint32_t mask) |
Function for checking if the specified interrupts are enabled. | |
NRF_STATIC_INLINE uint32_t | nrf_fll16m_int_pending_get (NRF_FLL16M_Type const *p_reg) |
Function for retrieving the state of pending interrupts. | |
NRF_STATIC_INLINE bool | nrf_fll16m_powerup_ready_check (NRF_FLL16M_Type const *p_reg) |
Function for checking power up status. | |
NRF_STATIC_INLINE void | nrf_fll16m_clockstatus_get (NRF_FLL16M_Type const *p_reg, nrf_fll16m_clockstatus_t *p_status) |
Function for getting the clock status. | |
NRF_STATIC_INLINE bool | nrf_fll16m_freqmeas_done_check (NRF_FLL16M_Type const *p_reg) |
Function for checking the frequency measurement completion status. | |
NRF_STATIC_INLINE bool | nrf_fll16m_freqmeas_error_check (NRF_FLL16M_Type const *p_reg) |
Function for checking the frequency measurement error status. | |
NRF_STATIC_INLINE uint16_t | nrf_fll16m_freqmeas_value_get (NRF_FLL16M_Type const *p_reg) |
Function for getting the frequency measurement. | |
NRF_STATIC_INLINE nrf_fll16m_freqmeas_clocksel_t | nrf_fll16m_freqmeas_clocksel_get (NRF_FLL16M_Type const *p_reg) |
Function for getting clock selection for the frequency measurement. | |
NRF_STATIC_INLINE void | nrf_fll16m_freqmeas_clocksel_set (NRF_FLL16M_Type *p_reg, nrf_fll16m_freqmeas_clocksel_t clocksel) |
Function for selecting clock for the frequency measurement. | |
NRF_STATIC_INLINE void | nrf_fll16m_clkctrl_mode_set (NRF_FLL16M_Type *p_reg, nrf_fll16m_clockctrl_t const *p_config) |
Function for setting clock control. | |
NRF_STATIC_INLINE void | nrf_fll16m_clctrl_dithering_set (NRF_FLL16M_Type *p_reg, nrf_fll16m_dithering_t const *p_config) |
Function for setting clock dithering configuration. | |
NRF_STATIC_INLINE void | nrf_fll16m_clctrl_sleep_set (NRF_FLL16M_Type *p_reg, nrf_fll16m_sleep_t const *p_config) |
Function for setting sleep configuration. | |
NRF_STATIC_INLINE void | nrf_fll16m_clctrl_retain_set (NRF_FLL16M_Type *p_reg, bool retain) |
Function for setting the retention of the fine trim control. | |
NRF_STATIC_INLINE void | nrf_fll16m_clctrl_override_locked_set (NRF_FLL16M_Type *p_reg, bool override) |
Function for setting the override of the LOCKED signal. | |
NRF_STATIC_INLINE void | nrf_fll16m_clctrl_refclock_set (NRF_FLL16M_Type *p_reg, nrf_fll16m_refclock_t const *p_config) |
Function for setting reference clock configuration. | |
NRF_STATIC_INLINE void | nrf_fll16m_clctrl_default_slope_set (NRF_FLL16M_Type *p_reg, uint16_t slope) |
Function for setting default slope value for FLL16M. | |
NRF_STATIC_INLINE void | nrf_fll16m_clctrl_freq_meas_limit_set (NRF_FLL16M_Type *p_reg, uint8_t limit) |
Function for setting frequency measurement limit. | |
Hardware access layer for managing the 16 MHz Frequency Locked Loop (FLL16M) peripheral.
enum nrf_fll16m_event_t |
Clock selection for the frequency measurement.
enum nrf_fll16m_mode_t |
enum nrf_fll16m_task_t |
NRF_STATIC_INLINE void nrf_fll16m_clctrl_default_slope_set | ( | NRF_FLL16M_Type * | p_reg, |
uint16_t | slope | ||
) |
Function for setting default slope value for FLL16M.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | slope | Slope value. |
NRF_STATIC_INLINE void nrf_fll16m_clctrl_dithering_set | ( | NRF_FLL16M_Type * | p_reg, |
nrf_fll16m_dithering_t const * | p_config | ||
) |
Function for setting clock dithering configuration.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | p_config | Configuration parameters. |
NRF_STATIC_INLINE void nrf_fll16m_clctrl_freq_meas_limit_set | ( | NRF_FLL16M_Type * | p_reg, |
uint8_t | limit | ||
) |
Function for setting frequency measurement limit.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | limit | Determines how many frequency jumps the FLL16M will do before reaching locked state where the fine trim is changed by only +/-1. |
NRF_STATIC_INLINE void nrf_fll16m_clctrl_override_locked_set | ( | NRF_FLL16M_Type * | p_reg, |
bool | override | ||
) |
Function for setting the override of the LOCKED signal.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | override | True if the override is to be enabled, false otherwise. |
NRF_STATIC_INLINE void nrf_fll16m_clctrl_refclock_set | ( | NRF_FLL16M_Type * | p_reg, |
nrf_fll16m_refclock_t const * | p_config | ||
) |
Function for setting reference clock configuration.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | p_config | Configuration parameters. |
NRF_STATIC_INLINE void nrf_fll16m_clctrl_retain_set | ( | NRF_FLL16M_Type * | p_reg, |
bool | retain | ||
) |
Function for setting the retention of the fine trim control.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | retain | True if the fine trim control is to be retained when FLL16M goes to open-loop mode, false otherwise. |
NRF_STATIC_INLINE void nrf_fll16m_clctrl_sleep_set | ( | NRF_FLL16M_Type * | p_reg, |
nrf_fll16m_sleep_t const * | p_config | ||
) |
Function for setting sleep configuration.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | p_config | Configuration parameters. |
NRF_STATIC_INLINE void nrf_fll16m_clkctrl_mode_set | ( | NRF_FLL16M_Type * | p_reg, |
nrf_fll16m_clockctrl_t const * | p_config | ||
) |
Function for setting clock control.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | p_config | Configuration parameters. |
NRF_STATIC_INLINE void nrf_fll16m_clockstatus_get | ( | NRF_FLL16M_Type const * | p_reg, |
nrf_fll16m_clockstatus_t * | p_status | ||
) |
Function for getting the clock status.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[out] | p_status | Pointer to the structure to be filled with clock status. |
NRF_STATIC_INLINE uint32_t nrf_fll16m_event_address_get | ( | NRF_FLL16M_Type const * | p_reg, |
nrf_fll16m_event_t | event | ||
) |
Function for retrieving the address of the specified event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | FLL16M event. |
NRF_STATIC_INLINE bool nrf_fll16m_event_check | ( | NRF_FLL16M_Type const * | p_reg, |
nrf_fll16m_event_t | event | ||
) |
Function for retrieving the state of the specified event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event to be checked. |
true | The event has been generated. |
false | The event has not been generated. |
NRF_STATIC_INLINE void nrf_fll16m_event_clear | ( | NRF_FLL16M_Type * | p_reg, |
nrf_fll16m_event_t | event | ||
) |
Function for clearing the specified event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event to clear. |
NRF_STATIC_INLINE nrf_fll16m_freqmeas_clocksel_t nrf_fll16m_freqmeas_clocksel_get | ( | NRF_FLL16M_Type const * | p_reg | ) |
Function for getting clock selection for the frequency measurement.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_fll16m_freqmeas_clocksel_set | ( | NRF_FLL16M_Type * | p_reg, |
nrf_fll16m_freqmeas_clocksel_t | clocksel | ||
) |
Function for selecting clock for the frequency measurement.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | clocksel | Clock selection. |
NRF_STATIC_INLINE bool nrf_fll16m_freqmeas_done_check | ( | NRF_FLL16M_Type const * | p_reg | ) |
Function for checking the frequency measurement completion status.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
true | Frequency measurement is completed. |
false | Frequency measurement is in progress. |
NRF_STATIC_INLINE bool nrf_fll16m_freqmeas_error_check | ( | NRF_FLL16M_Type const * | p_reg | ) |
Function for checking the frequency measurement error status.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
true | Frequency exceeded the accuracy 0.5% in closed loop mode. |
false | Frequency stayed within accuracy 0.5% in closed loop mode. |
NRF_STATIC_INLINE uint16_t nrf_fll16m_freqmeas_value_get | ( | NRF_FLL16M_Type const * | p_reg | ) |
Function for getting the frequency measurement.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_fll16m_int_disable | ( | NRF_FLL16M_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for disabling the specified interrupt.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be disabled. Use nrf_fll16m_int_mask_t values for bit masking. |
NRF_STATIC_INLINE void nrf_fll16m_int_enable | ( | NRF_FLL16M_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for enabling the specified interrupt.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be enabled. Use nrf_fll16m_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint32_t nrf_fll16m_int_enable_check | ( | NRF_FLL16M_Type const * | p_reg, |
uint32_t | mask | ||
) |
Function for checking if the specified interrupts are enabled.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be checked. Use nrf_fll16m_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint32_t nrf_fll16m_int_pending_get | ( | NRF_FLL16M_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.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE bool nrf_fll16m_powerup_ready_check | ( | NRF_FLL16M_Type const * | p_reg | ) |
Function for checking power up status.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE uint32_t nrf_fll16m_task_address_get | ( | NRF_FLL16M_Type const * | p_reg, |
nrf_fll16m_task_t | task | ||
) |
Function for retrieving the address of the specified task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | FLL16M Task. |
NRF_STATIC_INLINE void nrf_fll16m_task_trigger | ( | NRF_FLL16M_Type * | p_reg, |
nrf_fll16m_task_t | task | ||
) |
Function for triggering the specified task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task to be activated. |