AUXPLL HAL

group nrf_auxpll_hal

Hardware access layer for managing the Auxiliary Phase Locked Loop (AUXPLL) peripheral.

Enums

enum nrf_auxpll_task_t

AUXPLL tasks.

Values:

enumerator NRF_AUXPLL_TASK_START

Start the AUXPLL.

enumerator NRF_AUXPLL_TASK_STOP

Stop the AUXPLL.

enumerator NRF_AUXPLL_TASK_FREQ_NEW_FINE

Change fine frequency.

enumerator NRF_AUXPLL_TASK_FREQ_NEW_BASE

Change base frequency.

enumerator NRF_AUXPLL_TASK_FREQ_INC_START

Start automated frequency increment.

enumerator NRF_AUXPLL_TASK_FREQ_INC_STOP

Stop automated frequency increment.

enum nrf_auxpll_event_t

AUXPLL events.

Values:

enumerator NRF_AUXPLL_EVENT_STARTED

Event indicating that AUXPLL started.

enumerator NRF_AUXPLL_EVENT_STOPPED

Event indicating that AUXPLL stopped.

enumerator NRF_AUXPLL_EVENT_LOCKED

Event indicating that AUXPLL locked.

enum nrf_auxpll_int_mask_t

AUXPLL interrupts.

Values:

enumerator NRF_AUXPLL_INT_STARTED_MASK

AUXPLL interrupt for STARTED event.

enumerator NRF_AUXPLL_INT_STOPPED_MASK

AUXPLL interrupt for STOPPED event.

enumerator NRF_AUXPLL_INT_LOCKED_MASK

AUXPLL interrupt for LOCKED event.

enum nrf_auxpll_status_mask_t

AUXPLL STATUS register bit masks.

Values:

enumerator NRF_AUXPLL_STATUS_MODE_MASK

AUXPLL mode indication. 1 - Locked mode, 0 - Freerunning mode.

enumerator NRF_AUXPLL_STATUS_PLL_RUNNING_MASK

AUXPLL running indication. 1 - PLL running, 0 - PLL not running.

enumerator MRF_AUXPLL_STATUS_FREQUENCY_ACTUAL_MASK

Actual fractional PLL divider ratio.

enum nrf_auxpll_ctrl_outsel_t

AUXPLL output prescaler ratio.

Values:

enumerator NRF_AUXPLL_CTRL_OUTSEL_DIV_DISABLED

Divider disabled. Bypassed external clock still supported.

enumerator NRF_AUXPLL_CTRL_OUTSEL_DIV_1

Divide by 1

enumerator NRF_AUXPLL_CTRL_OUTSEL_DIV_2

Divide by 2

enumerator NRF_AUXPLL_CTRL_OUTSEL_DIV_3

Divide by 3

enumerator NRF_AUXPLL_CTRL_OUTSEL_DIV_4

Divide by 4

enumerator NRF_AUXPLL_CTRL_OUTSEL_DIV_6

Divide by 6

enumerator NRF_AUXPLL_CTRL_OUTSEL_DIV_8

Divide by 8

enumerator NRF_AUXPLL_CTRL_OUTSEL_DIV_12

Divide by 12

enumerator NRF_AUXPLL_CTRL_OUTSEL_DIV_16

Divide by 16

enum nrf_auxpll_ctrl_mode_t

AUXPLL freerunning mode control.

Values:

enumerator NRF_AUXPLL_CTRL_MODE_AUTO

Automatically handled by the AUXPLL peripheral.

enumerator NRF_AUXPLL_CTRL_MODE_FREERUN

Keep AUXPLL in freerunning mode.

enumerator NRF_AUXPLL_CTRL_MODE_LOCKED

Keep AUXPLL in locked mode.

enum nrf_auxpll_divider_range_t

AUXPLL Loop divider base settings.

Values:

enumerator NRF_AUXPLL_DIVIDER_RANGE_LOW

Low range divider setting. Fractional divider in the range 3..4

enumerator NRF_AUXPLL_DIVIDER_RANGE_MID

Mid range divider setting. Fractional divider in the range 4..5

enumerator NRF_AUXPLL_DIVIDER_RANGE_HIGH

High range divider setting. Fractional divider in the range 5..6

enumerator NRF_AUXPLL_DIVIDER_RANGE_MAX

Maximum static divider setting. Fractional division not supported.

Functions

NRF_STATIC_INLINE void nrf_auxpll_task_trigger(NRF_AUXPLL_Type *p_reg, nrf_auxpll_task_t task)

Function for activating the specified AUXPLL task.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • task[in] Task to be activated.

NRF_STATIC_INLINE uint32_t nrf_auxpll_task_address_get(NRF_AUXPLL_Type const *p_reg, nrf_auxpll_task_t task)

Function for getting the address of the specified AUXPLL task register.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • task[in] The specified task.

Returns:

Address of the specified task register.

NRF_STATIC_INLINE void nrf_auxpll_event_clear(NRF_AUXPLL_Type *p_reg, nrf_auxpll_event_t event)

Function for clearing the specified AUXPLL event.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] Event to clear.

NRF_STATIC_INLINE bool nrf_auxpll_event_check(NRF_AUXPLL_Type const *p_reg, nrf_auxpll_event_t event)

Function for retrieving the state of the AUXPLL event.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] Event to be checked.

Return values:
  • true – The event has been generated.

  • false – The event has not been generated.

NRF_STATIC_INLINE uint32_t nrf_auxpll_event_address_get(NRF_AUXPLL_Type const *p_reg, nrf_auxpll_event_t event)

Function for getting the address of the specified AUXPLL event register.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] The specified event.

Returns:

Address of the specified event register.

NRF_STATIC_INLINE void nrf_auxpll_int_enable(NRF_AUXPLL_Type *p_reg, uint32_t mask)

Function for enabling the specified interrupts.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • mask[in] Mask of interrupts to be enabled. Use nrf_auxpll_int_mask_t values for bit masking.

NRF_STATIC_INLINE void nrf_auxpll_int_disable(NRF_AUXPLL_Type *p_reg, uint32_t mask)

Function for disabling the specified interrupts.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • mask[in] Mask of interrupts to be disabled. Use nrf_auxpll_int_mask_t values for bit masking.

NRF_STATIC_INLINE bool nrf_auxpll_int_enable_check(NRF_AUXPLL_Type const *p_reg, uint32_t mask)

Function for checking if the specified interrupts are enabled.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • mask[in] Mask of interrupts to be checked. Use nrf_auxpll_int_mask_t values for bit masking.

Returns:

true requested interrupts are enabled.

Returns:

false requested interrupts are disabled.

NRF_STATIC_INLINE bool nrf_auxpll_int_pending_check(NRF_AUXPLL_Type const *p_reg, uint32_t mask)

Function for checking if the specified interrupts are pending.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • mask[in] Mask of interrupts to be checked. Use nrf_auxpll_int_mask_t values for bit masking.

Returns:

true requested interrupts are pending.

Returns:

false requested interrupts are not pending.

NRF_STATIC_INLINE uint32_t nrf_auxpll_status_get(NRF_AUXPLL_Type const *p_reg)

Function for getting AUXPLL status.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

Returns:

The AUXPLL STATUS register value. Use nrf_auxpll_status_mask_t values for bit masking.

NRF_STATIC_INLINE void nrf_auxpll_config_get(NRF_AUXPLL_Type const *p_reg, nrf_auxpll_config_t *p_cfg)

Function for getting the AUXPLL configuration.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • p_cfg[out] Pointer to the structure to be filled with current AUXPLL configuration.

NRF_STATIC_INLINE void nrf_auxpll_config_set(NRF_AUXPLL_Type *p_reg, nrf_auxpll_config_t const *p_cfg)

Function for setting the AUXPLL configuration.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • p_cfg[in] Pointer to the structure with AUXPLL configuration.

NRF_STATIC_INLINE void nrf_auxpll_trim_ctune_set(NRF_AUXPLL_Type *p_reg, uint8_t value)

Function for setting the AUXPLL ring oscillator core process corner tuning.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • value[in] tuning frequency value.

NRF_STATIC_INLINE uint8_t nrf_auxpll_trim_ctune_get(NRF_AUXPLL_Type const *p_reg)

Function for getting the AUXPLL ring oscillator core process corner tuning.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

Returns:

The AUXPLL ring oscillator core process corner tuning value.

NRF_STATIC_INLINE void nrf_auxpll_ctrl_frequency_set(NRF_AUXPLL_Type *p_reg, uint16_t value)

Function for setting the AUXPLL fractional PLL divider ratio tuning.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • value[in] Fractional divider ratio.

NRF_STATIC_INLINE uint16_t nrf_auxpll_ctrl_frequency_get(NRF_AUXPLL_Type const *p_reg)

Function for getting the AUXPLL fractional PLL divider ratio.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

Returns:

Fractional divider ratio.

NRF_STATIC_INLINE void nrf_auxpll_ctrl_freqinc_set(NRF_AUXPLL_Type *p_reg, int8_t value)

Function for setting the AUXPLL frequency increment value.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • value[in] Signed 8-bit frequency increment, applied to current value of FREQUENCY register.

NRF_STATIC_INLINE int8_t nrf_auxpll_ctrl_freqinc_get(NRF_AUXPLL_Type const *p_reg)

Function for getting the AUXPLL frequency increment value.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

Returns:

Signed 8-bit frequency increment.

NRF_STATIC_INLINE void nrf_auxpll_ctrl_freqinc_period_set(NRF_AUXPLL_Type *p_reg, uint16_t value)

Function for setting the AUXPLL frequency increment period.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • value[in] Frequency increment period in 1 us steps.

NRF_STATIC_INLINE uint16_t nrf_auxpll_ctrl_freqinc_period_get(NRF_AUXPLL_Type const *p_reg)

Function for getting the AUXPLL frequency increment period value.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

Returns:

Frequency increment period.

NRF_STATIC_INLINE void nrf_auxpll_ctrl_outsel_set(NRF_AUXPLL_Type *p_reg, nrf_auxpll_ctrl_outsel_t value)

Function for setting the AUXPLL output prescaler.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • value[in] Prescaler ratio.

NRF_STATIC_INLINE nrf_auxpll_ctrl_outsel_t nrf_auxpll_ctrl_outsel_get(NRF_AUXPLL_Type const *p_reg)

Function for getting the AUXPLL output prescaler value.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

Returns:

Prescaler ratio.

NRF_STATIC_INLINE void nrf_auxpll_ctrl_mode_set(NRF_AUXPLL_Type *p_reg, nrf_auxpll_ctrl_mode_t value)

Function for setting the AUXPLL mode.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • value[in] AUXPLL running mode.

NRF_STATIC_INLINE nrf_auxpll_ctrl_mode_t nrf_auxpll_ctrl_mode_get(NRF_AUXPLL_Type const *p_reg)

Function for getting the AUXPLL mode.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

Returns:

AUXPLL running mode.

NRF_STATIC_INLINE void nrf_auxpll_lock(NRF_AUXPLL_Type *p_reg)

Enable LOCK for mirrored AUXPLL registers.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

NRF_STATIC_INLINE void nrf_auxpll_unlock(NRF_AUXPLL_Type *p_reg)

Disable the lock after configuring all AUXPLL mirrored registers.

The individual mirrored registers can be updated any time when the lock is disabled.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

NRF_STATIC_INLINE bool nrf_auxpll_lock_check(NRF_AUXPLL_Type const *p_reg)

Check if mirrored AUXPLL registers are locked.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

Return values:
  • true – The AUXPLL mirrored register lock enabled.

  • false – The AUXPLL mirrored register lock disabled.

NRF_STATIC_INLINE uint8_t nrf_auxpll_static_ratio_get(NRF_AUXPLL_Type const *p_reg)

Obtain static ratio when DSM is disabled.

Parameters:
  • p_reg – Pointer to the structure of registers of the peripheral.

Returns:

Static ratio value.

NRF_STATIC_INLINE bool nrf_auxpll_mode_locked_check(NRF_AUXPLL_Type const *p_reg)

Check if AUXPLL is locked.

Parameters:
  • p_reg – Pointer to the structure of registers of the peripheral.

Return values:
  • true – The AUXPLL is locked.

  • false – The AUXPLL is not locked.

NRF_STATIC_INLINE bool nrf_auxpll_running_check(NRF_AUXPLL_Type const *p_reg)

Check if AUXPLL is running.

Parameters:
  • p_reg – Pointer to the structure of registers of the peripheral.

Return values:
  • true – The AUXPLL is running.

  • false – The AUXPLL is not running.

struct nrf_auxpll_config_t
#include <nrf_auxpll.h>

AUXPLL configuration.

Public Members

uint8_t outdrive

Output buffer drive strength selection. Range 0..3

uint8_t current_tune

Constant current tune for ring oscillator. Range 0..15

bool sdm_off

Turn off sigma delta modulation

bool dither_off

Turn off dither in sigma delta modulator

nrf_auxpll_divider_range_t range

Loop divider base settings