nrfx 3.3
Data Structures | Macros | Enumerations | Functions
HSFLL HAL

Hardware access layer for managing the High Speed Frequency Locked Loop (HSFLL). More...

Data Structures

struct  nrf_hsfll_status_clk_t
 HSFLL clock status. More...
 
struct  nrf_hsfll_freqm_error_t
 HSFLL frequency measurements errors. More...
 
struct  nrf_hsfll_clkctrl_t
 HSFLL clock control. More...
 
struct  nrf_hsfll_dithering_t
 HSFLL clock dithering configuration. More...
 
struct  nrf_hsfll_sleep_t
 HSFLL clock sleep configuration. More...
 
struct  nrf_hsfll_trim_t
 HSFLL trims configuration. More...
 

Macros

#define NRF_HSFLL_HAS_DITHERING_INITVALUE   1
 Symbol indicating whether initial value for clock dithering configuration is present.
 
#define NRF_HSFLL_HAS_DITHERINIT   1
 Symbol indicating whether initial value for clock dithering seed configuration is present.
 

Enumerations

enum  nrf_hsfll_task_t {
  NRF_HSFLL_TASK_START = offsetof(NRF_HSFLL_Type, TASKS_START) ,
  NRF_HSFLL_TASK_STOP = offsetof(NRF_HSFLL_Type, TASKS_STOP) ,
  NRF_HSFLL_TASK_FREQ_MEAS = offsetof(NRF_HSFLL_Type, TASKS_FREQMEAS) ,
  NRF_HSFLL_TASK_FREQ_CHANGE = offsetof(NRF_HSFLL_Type, TASKS_FREQCHANGE)
}
 HSFLL tasks. More...
 
enum  nrf_hsfll_event_t {
  NRF_HSFLL_EVENT_STARTED = offsetof(NRF_HSFLL_Type, EVENTS_STARTED) ,
  NRF_HSFLL_EVENT_STOPPED = offsetof(NRF_HSFLL_Type, EVENTS_STOPPED) ,
  NRF_HSFLL_EVENT_FREQM_DONE = offsetof(NRF_HSFLL_Type, EVENTS_FREQMDONE) ,
  NRF_HSFLL_EVENT_FREQ_CHANGED = offsetof(NRF_HSFLL_Type, EVENTS_FREQCHANGED)
}
 HSFLL events. More...
 
enum  nrf_hsfll_mode_status_t {
  NRF_HSFLL_MODE_STATUS_OPEN_LOOP = HSFLL_CLOCKSTATUS_MODE_OpenLoop ,
  NRF_HSFLL_MODE_STATUS_CLOSED_LOOP = HSFLL_CLOCKSTATUS_MODE_ClosedLoop ,
  NRF_HSFLL_MODE_STATUS_BYPASS = HSFLL_CLOCKSTATUS_MODE_Bypass
}
 HSFLL clock status operating modes. More...
 
enum  nrf_hsfll_mode_ctrl_t {
  NRF_HSFLL_MODE_CTRL_AUTO = HSFLL_CLOCKCTRL_MODE_MODE_Auto ,
  NRF_HSFLL_MODE_CTRL_OPEN_LOOP = HSFLL_CLOCKCTRL_MODE_MODE_OpenLoop ,
  NRF_HSFLL_MODE_CTRL_CLOSED_LOOP = HSFLL_CLOCKCTRL_MODE_MODE_ClosedLoop ,
  NRF_HSFLL_MODE_CTRL_BYPASS = HSFLL_CLOCKCTRL_MODE_MODE_Bypass
}
 HSFLL clock control operating mode settings. More...
 

Functions

NRF_STATIC_INLINE uint32_t nrf_hsfll_task_address_get (NRF_HSFLL_Type const *p_reg, nrf_hsfll_task_t task)
 Function for getting the address of the specified task.
 
NRF_STATIC_INLINE void nrf_hsfll_task_trigger (NRF_HSFLL_Type *p_reg, nrf_hsfll_task_t task)
 Function for triggering the specified task.
 
NRF_STATIC_INLINE uint32_t nrf_hsfll_event_address_get (NRF_HSFLL_Type const *p_reg, nrf_hsfll_event_t event)
 Function for retrieving the address of the specified event.
 
NRF_STATIC_INLINE void nrf_hsfll_event_clear (NRF_HSFLL_Type *p_reg, nrf_hsfll_event_t event)
 Function for clearing the specified event.
 
NRF_STATIC_INLINE bool nrf_hsfll_event_check (NRF_HSFLL_Type const *p_reg, nrf_hsfll_event_t event)
 Function for retrieving the state of the specified event.
 
NRF_STATIC_INLINE void nrf_hsfll_status_clk_get (NRF_HSFLL_Type const *p_reg, nrf_hsfll_status_clk_t *p_status)
 Function for getting the HSFLL status.
 
NRF_STATIC_INLINE bool nrf_hsfll_freqm_done_check (NRF_HSFLL_Type const *p_reg)
 Function for checking whether the HSFLL frequency measurement is completed.
 
NRF_STATIC_INLINE void nrf_hsfll_freqm_error_get (NRF_HSFLL_Type const *p_reg, nrf_hsfll_freqm_error_t *p_error)
 Function for getting HSFLL frequency measurement errors.
 
NRF_STATIC_INLINE uint32_t nrf_hsfll_freqm_meas_get (NRF_HSFLL_Type const *p_reg)
 Function for getting HSFLL frequency measurement.
 
NRF_STATIC_INLINE void nrf_hsfll_clkctrl_mode_set (NRF_HSFLL_Type *p_reg, nrf_hsfll_clkctrl_t const *p_clkctrl)
 Function for setting HSFLL clock control mode settings.
 
NRF_STATIC_INLINE void nrf_hsfll_clkctrl_mode_get (NRF_HSFLL_Type const *p_reg, nrf_hsfll_clkctrl_t *p_clkctrl)
 Function for getting HSFLL clock control mode settings.
 
NRF_STATIC_INLINE void nrf_hsfll_clkctrl_dithering_set (NRF_HSFLL_Type *p_reg, nrf_hsfll_dithering_t const *p_config)
 Function for setting HSFLL clock dithering configuration.
 
NRF_STATIC_INLINE void nrf_hsfll_clkctrl_dithering_get (NRF_HSFLL_Type const *p_reg, nrf_hsfll_dithering_t *p_config)
 Function for getting HSFLL clock dithering configuration.
 
NRF_STATIC_INLINE void nrf_hsfll_clkctrl_mult_set (NRF_HSFLL_Type *p_reg, uint32_t multiplier)
 Function for setting HSFLL frequency multiplier.
 
NRF_STATIC_INLINE uint32_t nrf_hsfll_clkctrl_mult_get (NRF_HSFLL_Type const *p_reg)
 Function for getting HSFLL frequency multiplier.
 
NRF_STATIC_INLINE void nrf_hsfll_clkctrl_sleep_set (NRF_HSFLL_Type *p_reg, nrf_hsfll_sleep_t const *p_config)
 Function for setting HSFLL clock sleep configuration.
 
NRF_STATIC_INLINE void nrf_hsfll_clkctrl_sleep_get (NRF_HSFLL_Type const *p_reg, nrf_hsfll_sleep_t *p_config)
 Function for getting HSFLL clock sleep configuration.
 
NRF_STATIC_INLINE void nrf_hsfll_clkctrl_retainfinetrim_enable_set (NRF_HSFLL_Type *p_reg, bool retain)
 Function for enabling or disabling the retention of HSFLL fine trim control.
 
NRF_STATIC_INLINE void nrf_hsfll_clkctrl_overridelocked_enable_set (NRF_HSFLL_Type *p_reg, bool override)
 Function for enabling or disabling the override of the HSFLL LOCKED signal.
 
NRF_STATIC_INLINE void nrf_hsfll_clkctrl_dither_init_set (NRF_HSFLL_Type *p_reg, uint32_t seed)
 Function for setting the configurable seed of HSFLL clock dithering.
 
NRF_STATIC_INLINE void nrf_hsfll_mirror_lock_set (NRF_HSFLL_Type *p_reg, bool enable)
 Function for enabling or disabling lock for mirrored registers.
 
NRF_STATIC_INLINE void nrf_hsfll_trim_set (NRF_HSFLL_Type *p_reg, nrf_hsfll_trim_t const *p_trim)
 Function to setup trims configuration.
 
NRF_STATIC_INLINE void nrf_hsfll_trim_get (NRF_HSFLL_Type const *p_reg, nrf_hsfll_trim_t *p_trim)
 Function to getting trims configuration.
 

Detailed Description

Hardware access layer for managing the High Speed Frequency Locked Loop (HSFLL).

Enumeration Type Documentation

◆ nrf_hsfll_event_t

HSFLL events.

Enumerator
NRF_HSFLL_EVENT_STARTED 

HSFLL started.

NRF_HSFLL_EVENT_STOPPED 

HSFLL stopped.

NRF_HSFLL_EVENT_FREQM_DONE 

HSFLL frequency measurement done.

NRF_HSFLL_EVENT_FREQ_CHANGED 

HSFLL frequency change done.

◆ nrf_hsfll_mode_ctrl_t

HSFLL clock control operating mode settings.

Enumerator
NRF_HSFLL_MODE_CTRL_AUTO 

The PCGC controls the mode automatically.

NRF_HSFLL_MODE_CTRL_OPEN_LOOP 

Open loop mode.

NRF_HSFLL_MODE_CTRL_CLOSED_LOOP 

Closed loop mode.

NRF_HSFLL_MODE_CTRL_BYPASS 

Bypass mode.

◆ nrf_hsfll_mode_status_t

HSFLL clock status operating modes.

Enumerator
NRF_HSFLL_MODE_STATUS_OPEN_LOOP 

Open loop mode.

NRF_HSFLL_MODE_STATUS_CLOSED_LOOP 

Closed loop mode.

NRF_HSFLL_MODE_STATUS_BYPASS 

Bypass mode.

◆ nrf_hsfll_task_t

HSFLL tasks.

Enumerator
NRF_HSFLL_TASK_START 

Start the HSFLL.

NRF_HSFLL_TASK_STOP 

Stop the HSFLL.

NRF_HSFLL_TASK_FREQ_MEAS 

Start frequency measurement in software-controlled mode.

NRF_HSFLL_TASK_FREQ_CHANGE 

Trigger frequency change.

Function Documentation

◆ nrf_hsfll_clkctrl_dither_init_set()

NRF_STATIC_INLINE void nrf_hsfll_clkctrl_dither_init_set ( NRF_HSFLL_Type *  p_reg,
uint32_t  seed 
)

Function for setting the configurable seed of HSFLL clock dithering.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]seed32-bit initial value for the PRBS.

◆ nrf_hsfll_clkctrl_dithering_get()

NRF_STATIC_INLINE void nrf_hsfll_clkctrl_dithering_get ( NRF_HSFLL_Type const *  p_reg,
nrf_hsfll_dithering_t p_config 
)

Function for getting HSFLL clock dithering configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_configPointer to the structure to be filled with HSFLL clock dithering configuration.

◆ nrf_hsfll_clkctrl_dithering_set()

NRF_STATIC_INLINE void nrf_hsfll_clkctrl_dithering_set ( NRF_HSFLL_Type *  p_reg,
nrf_hsfll_dithering_t const *  p_config 
)

Function for setting HSFLL clock dithering configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the structure with new HSFLL clock dithering configuration.

◆ nrf_hsfll_clkctrl_mode_get()

NRF_STATIC_INLINE void nrf_hsfll_clkctrl_mode_get ( NRF_HSFLL_Type const *  p_reg,
nrf_hsfll_clkctrl_t p_clkctrl 
)

Function for getting HSFLL clock control mode settings.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_clkctrlPointer to the structure to be filled with HSFLL clock control settings.

◆ nrf_hsfll_clkctrl_mode_set()

NRF_STATIC_INLINE void nrf_hsfll_clkctrl_mode_set ( NRF_HSFLL_Type *  p_reg,
nrf_hsfll_clkctrl_t const *  p_clkctrl 
)

Function for setting HSFLL clock control mode settings.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_clkctrlPointer to the structure with new HSFLL clock control mode settings.

◆ nrf_hsfll_clkctrl_mult_get()

NRF_STATIC_INLINE uint32_t nrf_hsfll_clkctrl_mult_get ( NRF_HSFLL_Type const *  p_reg)

Function for getting HSFLL frequency multiplier.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Current value of frequency multiplier used by HSFLL.

◆ nrf_hsfll_clkctrl_mult_set()

NRF_STATIC_INLINE void nrf_hsfll_clkctrl_mult_set ( NRF_HSFLL_Type *  p_reg,
uint32_t  multiplier 
)

Function for setting HSFLL frequency multiplier.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]multiplierValue of new multiplier. Valid multiplier range is from 4 to 25.

◆ nrf_hsfll_clkctrl_overridelocked_enable_set()

NRF_STATIC_INLINE void nrf_hsfll_clkctrl_overridelocked_enable_set ( NRF_HSFLL_Type *  p_reg,
bool  override 
)

Function for enabling or disabling the override of the HSFLL 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_hsfll_clkctrl_retainfinetrim_enable_set()

NRF_STATIC_INLINE void nrf_hsfll_clkctrl_retainfinetrim_enable_set ( NRF_HSFLL_Type *  p_reg,
bool  retain 
)

Function for enabling or disabling the retention of HSFLL 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 HSFLL goes to open-loop mode, false otherwise.

◆ nrf_hsfll_clkctrl_sleep_get()

NRF_STATIC_INLINE void nrf_hsfll_clkctrl_sleep_get ( NRF_HSFLL_Type const *  p_reg,
nrf_hsfll_sleep_t p_config 
)

Function for getting HSFLL clock sleep configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_configPointer to the structure to be filled with HSFLL clock sleep configuration.

◆ nrf_hsfll_clkctrl_sleep_set()

NRF_STATIC_INLINE void nrf_hsfll_clkctrl_sleep_set ( NRF_HSFLL_Type *  p_reg,
nrf_hsfll_sleep_t const *  p_config 
)

Function for setting HSFLL clock sleep configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the structure with new HSFLL clock sleep configuration.

◆ nrf_hsfll_event_address_get()

NRF_STATIC_INLINE uint32_t nrf_hsfll_event_address_get ( NRF_HSFLL_Type const *  p_reg,
nrf_hsfll_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]eventHSFLL event.
Returns
Address of the specified event register.

◆ nrf_hsfll_event_check()

NRF_STATIC_INLINE bool nrf_hsfll_event_check ( NRF_HSFLL_Type const *  p_reg,
nrf_hsfll_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_hsfll_event_clear()

NRF_STATIC_INLINE void nrf_hsfll_event_clear ( NRF_HSFLL_Type *  p_reg,
nrf_hsfll_event_t  event 
)

Function for clearing the specified event.

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

◆ nrf_hsfll_freqm_done_check()

NRF_STATIC_INLINE bool nrf_hsfll_freqm_done_check ( NRF_HSFLL_Type const *  p_reg)

Function for checking whether the HSFLL frequency measurement is completed.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueThe frequency measurement is completed.
falseThe frequency measurement is in progress.

◆ nrf_hsfll_freqm_error_get()

NRF_STATIC_INLINE void nrf_hsfll_freqm_error_get ( NRF_HSFLL_Type const *  p_reg,
nrf_hsfll_freqm_error_t p_error 
)

Function for getting HSFLL frequency measurement errors.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_errorPointer to the structure to be filled with HSFLL frequency measurement errors.

◆ nrf_hsfll_freqm_meas_get()

NRF_STATIC_INLINE uint32_t nrf_hsfll_freqm_meas_get ( NRF_HSFLL_Type const *  p_reg)

Function for getting HSFLL frequency measurement.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The last frequency measurement value. Measures the number of reference clock cycles.

◆ nrf_hsfll_mirror_lock_set()

NRF_STATIC_INLINE void nrf_hsfll_mirror_lock_set ( NRF_HSFLL_Type *  p_reg,
bool  enable 
)

Function for enabling or disabling lock for mirrored registers.

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

◆ nrf_hsfll_status_clk_get()

NRF_STATIC_INLINE void nrf_hsfll_status_clk_get ( NRF_HSFLL_Type const *  p_reg,
nrf_hsfll_status_clk_t p_status 
)

Function for getting the HSFLL status.

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

◆ nrf_hsfll_task_address_get()

NRF_STATIC_INLINE uint32_t nrf_hsfll_task_address_get ( NRF_HSFLL_Type const *  p_reg,
nrf_hsfll_task_t  task 
)

Function for getting the address of the specified task.

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

◆ nrf_hsfll_task_trigger()

NRF_STATIC_INLINE void nrf_hsfll_task_trigger ( NRF_HSFLL_Type *  p_reg,
nrf_hsfll_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.

◆ nrf_hsfll_trim_get()

NRF_STATIC_INLINE void nrf_hsfll_trim_get ( NRF_HSFLL_Type const *  p_reg,
nrf_hsfll_trim_t p_trim 
)

Function to getting trims configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_trimPointer to the structure to be filled with HSFLL trim configuration.

◆ nrf_hsfll_trim_set()

NRF_STATIC_INLINE void nrf_hsfll_trim_set ( NRF_HSFLL_Type *  p_reg,
nrf_hsfll_trim_t const *  p_trim 
)

Function to setup trims configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_trimPointer to the structure with new HSFLL trim configuration.

Documentation feedback | Developer Zone | Subscribe | Updated