nrfx 4.5.0
Loading...
Searching...
No Matches
LFCLK driver

LFCLK clock driver. More...

Macros

#define NRFX_CLOCK_LFCLK_LFRC_EVT_OFFSET   32
 Symbol specifying driver event offset for LFRC hardware events.
 

Typedefs

typedef void(* nrfx_clock_lfclk_event_handler_t) (nrfx_clock_lfclk_evt_type_t event)
 Lfclk event handler.
 

Enumerations

enum  nrfx_clock_lfclk_evt_type_t { NRFX_CLOCK_LFCLK_EVT_LFCLK_STARTED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_LF_STARTED_MASK) }
 Clock events. More...
 

Functions

int nrfx_clock_lfclk_init (nrfx_clock_lfclk_event_handler_t event_handler)
 Function for initializing internal structures in the nrfx_clock_lfclk module.
 
void nrfx_clock_lfclk_uninit (void)
 Function for uninitializing the lfclk module.
 
bool nrfx_clock_lfclk_init_check (void)
 Function for checking if the lfclk driver is initialized.
 
void nrfx_clock_lfclk_start (void)
 Function for starting the LFCLK.
 
void nrfx_clock_lfclk_stop (void)
 Function for stopping the LFCLK.
 
NRFX_STATIC_INLINE bool nrfx_clock_lfclk_running_check (nrf_clock_lfclk_t *p_clk_src)
 Function for checking the LFCLK state.
 
int nrfx_clock_lfclk_calibration_start (void)
 Function for starting the calibration of internal LFCLK.
 
int nrfx_clock_lfclk_calibrating_check (void)
 Function for checking if calibration is in progress.
 
void nrfx_clock_lfclk_calibration_timer_start (uint8_t interval)
 Function for starting calibration timer.
 
void nrfx_clock_lfclk_calibration_timer_stop (void)
 Function for stopping the calibration timer.
 

Detailed Description

LFCLK clock driver.

Typedef Documentation

◆ nrfx_clock_lfclk_event_handler_t

typedef void(* nrfx_clock_lfclk_event_handler_t) (nrfx_clock_lfclk_evt_type_t event)

Lfclk event handler.

Parameters
[in]eventEvent.

Enumeration Type Documentation

◆ nrfx_clock_lfclk_evt_type_t

Clock events.

Enumerator
NRFX_CLOCK_LFCLK_EVT_LFCLK_STARTED 

LFCLK has been started.

Function Documentation

◆ nrfx_clock_lfclk_calibrating_check()

int nrfx_clock_lfclk_calibrating_check ( void )

Function for checking if calibration is in progress.

This function indicates that the system is in calibration phase.

Return values
0The procedure is successful.
-EBUSYClock is in the calibration phase.

◆ nrfx_clock_lfclk_calibration_start()

int nrfx_clock_lfclk_calibration_start ( void )

Function for starting the calibration of internal LFCLK.

This function starts the calibration process. The process cannot be aborted. LFCLK and (HFCLK or XO) must be running before this function is called.

Return values
0The procedure is successful.
-EINPROGRESSThe low-frequency or high-frequency clock is off.
-EBUSYClock is in the calibration phase.

◆ nrfx_clock_lfclk_calibration_timer_start()

void nrfx_clock_lfclk_calibration_timer_start ( uint8_t interval)

Function for starting calibration timer.

Parameters
[in]intervalTime after which the CTTO event and interrupt will be generated (in 0.25 s units).

◆ nrfx_clock_lfclk_init()

int nrfx_clock_lfclk_init ( nrfx_clock_lfclk_event_handler_t event_handler)

Function for initializing internal structures in the nrfx_clock_lfclk module.

After initialization, the module is in power off state (clocks are not started).

Parameters
[in]event_handlerEvent handler provided by the user. If not provided, driver works in blocking mode.
Return values
0The procedure is successful.
-EALREADYThe driver is already initialized.

◆ nrfx_clock_lfclk_init_check()

bool nrfx_clock_lfclk_init_check ( void )

Function for checking if the lfclk driver is initialized.

Return values
trueDriver is already initialized.
falseDriver is not initialized.

◆ nrfx_clock_lfclk_running_check()

NRFX_STATIC_INLINE bool nrfx_clock_lfclk_running_check ( nrf_clock_lfclk_t * p_clk_src)

Function for checking the LFCLK state.

XTAL source is assumed for domains with multiple sources.

Parameters
[out]p_clk_srcPointer to a clock source that is running. Set to NULL if not needed.
Return values
trueThe clock domain is running.
falseThe clock domain is not running.