28#if !defined (NRF54H_SERIES)
29#include "hal/nrf_clock.h"
38#if defined(NRF52_SERIES)
39 MPSL_CLOCK_LF_SRC_EXT_LOW_SWING = 3,
41 MPSL_CLOCK_LF_SRC_EXT_FULL_SWING = 4,
48#define MPSL_RECOMMENDED_RC_CTIV 16
51#define MPSL_RECOMMENDED_RC_TEMP_CTIV 2
54#define MPSL_DEFAULT_CLOCK_ACCURACY_PPM 250
59#define MPSL_WORST_CLOCK_ACCURACY_PPM 500
62#define MPSL_DEFAULT_SKIP_WAIT_LFCLK_STARTED false
135#if defined(NRF_CLOCK_HAS_HFCLK24M) && NRF_CLOCK_HAS_HFCLK24M
136 MPSL_CLOCK_HF_SRC_HFCLK24M = 1,
150#if defined(NRF_CLOCK_HAS_HFCLK24M) && NRF_CLOCK_HAS_HFCLK24M
152 MPSL_CLOCK_EVT_HFCLK24M_STARTED = 1,
154#if defined(NRF_CLOCK_HAS_XO_TUNE) && NRF_CLOCK_HAS_XO_TUNE
155 MPSL_CLOCK_EVT_XO_TUNED = 2,
191__attribute__((deprecated))
214__attribute__((deprecated))
231__attribute__((deprecated))
347 int32_t (*lfclk_wait)(void);
355 void (*lfclk_calibration_start)(void);
365 bool (*lfclk_calibration_is_enabled)(void);
375 int32_t (*lfclk_request)(void);
385 int32_t (*lfclk_release)(void);
415 void (*hfclk_request)(void);
423 void (*hfclk_release)(void);
433 bool (*hfclk_is_running)(void);
int32_t mpsl_clock_hfclk_src_release(mpsl_clock_hfclk_src_t src)
Releases a high frequency clock for a given source.
void(* mpsl_clock_hfclk_request_callback_t)(mpsl_clock_evt_type_t evt_type)
High frequency clock callback.
Definition mpsl_clock.h:269
mpsl_clock_evt_type_t
Event types returned by the hfclk callback handler.
Definition mpsl_clock.h:143
@ MPSL_CLOCK_EVT_MAX
Definition mpsl_clock.h:157
@ MPSL_CLOCK_EVT_HFCLK_STARTED
HFCLK has been started.
Definition mpsl_clock.h:149
void mpsl_clock_task_trigger_on_rtc_start_set(uint32_t task_address)
Trigger a task upon start of the RTC.
int32_t mpsl_clock_hfclk_src_is_running(mpsl_clock_hfclk_src_t src, uint32_t *p_is_running)
Checks if the high frequency clock for a given source is running.
MPSL_CLOCK_LF_SRC
Low frequency clock source.
Definition mpsl_clock.h:34
@ MPSL_CLOCK_LF_SRC_XTAL
Definition mpsl_clock.h:36
@ MPSL_CLOCK_LF_SRC_RC
Definition mpsl_clock.h:35
@ MPSL_CLOCK_LF_SRC_SYNTH
Definition mpsl_clock.h:37
int32_t mpsl_clock_ctrl_source_register(const mpsl_clock_lfclk_ctrl_source_t *p_lfclk_ctrl_source, const mpsl_clock_hfclk_ctrl_source_t *p_hfclk_ctrl_source)
Register an external clock driver.
int32_t mpsl_clock_hfclk_src_request(mpsl_clock_hfclk_src_t src, mpsl_clock_hfclk_request_callback_t hfclk_started_callback)
Request a high frequency clock with a given source.
void(* mpsl_clock_hfclk_callback_t)(void)
High frequency clock callback.
Definition mpsl_clock.h:165
int32_t mpsl_clock_hfclk_latency_set(uint16_t hfclk_rampup_time_us)
Informs MPSL about the actual ramp-up time of the high-frequency crystal oscillator.
int32_t mpsl_clock_hfclk_request(mpsl_clock_hfclk_callback_t hfclk_started_callback)
Request the high frequency crystal oscillator.
int32_t mpsl_clock_ctrl_source_unregister(void)
Unregisters external clock driver from MPSL.
mpsl_clock_hfclk_src_t
Supported high frequency clock sources.
Definition mpsl_clock.h:133
@ MPSL_CLOCK_HF_SRC_XO
Definition mpsl_clock.h:134
@ MPSL_CLOCK_HF_SRC_MAX
Definition mpsl_clock.h:138
mpsl_clock_hfclk_latency_config_t
Definition mpsl_clock.h:126
@ MPSL_CLOCK_HF_LATENCY_WORST_CASE
Definition mpsl_clock.h:129
@ MPSL_CLOCK_HF_LATENCY_BEST
Definition mpsl_clock.h:127
@ MPSL_CLOCK_HF_LATENCY_TYPICAL
Definition mpsl_clock.h:128
int32_t mpsl_clock_hfclk_is_running(uint32_t *p_is_running)
Checks if the high frequency crystal oscillator is running.
int32_t mpsl_clock_hfclk_release(void)
Releases the high frequency crystal oscillator.
uint16_t startup_time_us
Value of a HFXO startup time.
Definition mpsl_clock.h:439
Type representing HFCLK clock handling external API that is expected by MPSL to be delivered on init.
Definition mpsl_clock.h:408
uint8_t rc_temp_ctiv
Definition mpsl_clock.h:102
uint8_t source
Definition mpsl_clock.h:68
uint16_t accuracy_ppm
Definition mpsl_clock.h:107
uint8_t rc_ctiv
Definition mpsl_clock.h:79
bool skip_wait_lfclk_started
Definition mpsl_clock.h:121
Type representing LFCLK oscillator source.
Definition mpsl_clock.h:66
bool skip_wait_lfclk_started
Determines whether MPSL waits for the low frequency clock to start during initialization or not....
Definition mpsl_clock.h:401
uint16_t accuracy_ppm
Value of available LFCLK accuracy.
Definition mpsl_clock.h:391
Type representing LFCLK clock handling external API that is expected by MPSL to be delivered on init.
Definition mpsl_clock.h:338