nrfx 3.3
Data Structures | Enumerations | Functions
FLL16M HAL

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.
 

Detailed Description

Hardware access layer for managing the 16 MHz Frequency Locked Loop (FLL16M) peripheral.

Enumeration Type Documentation

◆ nrf_fll16m_clocksel_t

Clock selection.

Enumerator
NRF_FLL16M_CLOCKSEL_DCO16M 

Clock from DCO16M selected.

NRF_FLL16M_CLOCKSEL_HFXO 

Clock from HFXO selected.

◆ nrf_fll16m_event_t

FLL16M events.

Enumerator
NRF_FLL16M_EVENT_FREQMDONE 

Frequency measurement done.

NRF_FLL16M_EVENT_FREQMERROR 

Frequency measurement error.

NRF_FLL16M_EVENT_FREQCHANGED 

Frequency change done.

◆ nrf_fll16m_freqmeas_clocksel_t

Clock selection for the frequency measurement.

Enumerator
NRF_FLL16M_FREQMEAS_CLOCKSEL_DCO16M 

Clock from DCO16M selected.

NRF_FLL16M_FREQMEAS_CLOCKSEL_CKSW16M 

Clock from CKSW16M selected.

NRF_FLL16M_FREQMEAS_CLOCKSEL_HFXOBY2 

Clock from 32MHz HFXO divided by 2 selected.

NRF_FLL16M_FREQMEAS_CLOCKSEL_CKSW16MTESTOSC 

Clock from CKSW16M TESTOSC selected.

◆ nrf_fll16m_int_mask_t

FLL16M interrupts.

Enumerator
NRF_FLL16M_INT_FREQMDONE_MASK 

Interrupt on FREQMDONE event.

NRF_FLL16M_INT_FREQMERROR_MASK 

Interrupt on FREQMERROR event.

NRF_FLL16M_INT_FREQCHANGED_MASK 

Interrupt on FREQCHANGED event.

◆ nrf_fll16m_mode_t

FLL16M operating mode.

Enumerator
NRF_FLL16M_MODE_AUTO 

The PCGC controls the mode automatically.

NRF_FLL16M_MODE_OPENLOOP 

Open loop mode.

NRF_FLL16M_MODE_CLOSEDLOOP 

Closed loop mode.

NRF_FLL16M_MODE_REFRESH 

Refresh mode.

NRF_FLL16M_MODE_BYPASS 

Bypass mode.

◆ nrf_fll16m_refclock_select_t

Selection for the reference clock signal in software controlled mode.

Enumerator
NRF_FLL16M_REFCLOCK_SELECT_CLOCK32KHZ 

The 32 Ki clock selection.

NRF_FLL16M_REFCLOCK_SELECT_CLOCK16MHZ 

The 16 MHz clock selection.

◆ nrf_fll16m_task_t

FLL16M tasks.

Enumerator
NRF_FLL16M_TASK_ONESHOTLOCK 

Start one-shot locking process in Refresh mode.

NRF_FLL16M_TASK_SLEEP 

Enter into FLL16M sleep mode.

NRF_FLL16M_TASK_FREQMEAS 

Start frequency measurement in software-controlled mode.

NRF_FLL16M_TASK_FREQCHANGE 

Frequency measurement done.

Function Documentation

◆ nrf_fll16m_clctrl_default_slope_set()

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.

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

◆ nrf_fll16m_clctrl_dithering_set()

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.

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

◆ nrf_fll16m_clctrl_freq_meas_limit_set()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]limitDetermines how many frequency jumps the FLL16M will do before reaching locked state where the fine trim is changed by only +/-1.

◆ nrf_fll16m_clctrl_override_locked_set()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]overrideTrue if the override is to be enabled, false otherwise.

◆ nrf_fll16m_clctrl_refclock_set()

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.

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

◆ nrf_fll16m_clctrl_retain_set()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]retainTrue if the fine trim control is to be retained when FLL16M goes to open-loop mode, false otherwise.

◆ nrf_fll16m_clctrl_sleep_set()

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.

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

◆ nrf_fll16m_clkctrl_mode_set()

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.

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

◆ nrf_fll16m_clockstatus_get()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_statusPointer to the structure to be filled with clock status.

◆ nrf_fll16m_event_address_get()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventFLL16M event.
Returns
Address of the specified event register.

◆ nrf_fll16m_event_check()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be checked.
Return values
trueThe event has been generated.
falseThe event has not been generated.

◆ nrf_fll16m_event_clear()

NRF_STATIC_INLINE void nrf_fll16m_event_clear ( NRF_FLL16M_Type *  p_reg,
nrf_fll16m_event_t  event 
)

Function for clearing the specified event.

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

◆ nrf_fll16m_freqmeas_clocksel_get()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Enumerated type with clock selection data.

◆ nrf_fll16m_freqmeas_clocksel_set()

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.

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

◆ nrf_fll16m_freqmeas_done_check()

NRF_STATIC_INLINE bool nrf_fll16m_freqmeas_done_check ( NRF_FLL16M_Type const *  p_reg)

Function for checking the frequency measurement completion status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueFrequency measurement is completed.
falseFrequency measurement is in progress.

◆ nrf_fll16m_freqmeas_error_check()

NRF_STATIC_INLINE bool nrf_fll16m_freqmeas_error_check ( NRF_FLL16M_Type const *  p_reg)

Function for checking the frequency measurement error status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueFrequency exceeded the accuracy 0.5% in closed loop mode.
falseFrequency stayed within accuracy 0.5% in closed loop mode.

◆ nrf_fll16m_freqmeas_value_get()

NRF_STATIC_INLINE uint16_t nrf_fll16m_freqmeas_value_get ( NRF_FLL16M_Type const *  p_reg)

Function for getting the frequency measurement.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Last frequency measurement value (DCO16M clock cycles during two 32Ki cycles).

◆ nrf_fll16m_int_disable()

NRF_STATIC_INLINE void nrf_fll16m_int_disable ( NRF_FLL16M_Type *  p_reg,
uint32_t  mask 
)

Function for disabling the specified interrupt.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be disabled. Use nrf_fll16m_int_mask_t values for bit masking.

◆ nrf_fll16m_int_enable()

NRF_STATIC_INLINE void nrf_fll16m_int_enable ( NRF_FLL16M_Type *  p_reg,
uint32_t  mask 
)

Function for enabling the specified interrupt.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be enabled. Use nrf_fll16m_int_mask_t values for bit masking.

◆ nrf_fll16m_int_enable_check()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be checked. Use nrf_fll16m_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrf_fll16m_int_pending_get()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Bitmask with information about pending interrupts. Use nrf_fll16m_int_mask_t values for bit masking.

◆ nrf_fll16m_powerup_ready_check()

NRF_STATIC_INLINE bool nrf_fll16m_powerup_ready_check ( NRF_FLL16M_Type const *  p_reg)

Function for checking power up status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Power up status.

◆ nrf_fll16m_task_address_get()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskFLL16M Task.
Returns
Address of the requested task register.

◆ nrf_fll16m_task_trigger()

NRF_STATIC_INLINE void nrf_fll16m_task_trigger ( NRF_FLL16M_Type *  p_reg,
nrf_fll16m_task_t  task 
)

Function for triggering the specified task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask to be activated.

Documentation feedback | Developer Zone | Subscribe | Updated