nrfx 4.5.0
Loading...
Searching...
No Matches

LFCLK clock driver. More...

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 LFCLK driver.
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 clock.
void nrfx_clock_lfclk_stop (void)
 Function for stopping the LFCLK clock.
NRFX_STATIC_INLINE bool nrfx_clock_lfclk_running_check (nrf_clock_lfclk_t *p_clk_src)
 Function for checking the LFCLK clock 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.
void nrfx_clock_lfclk_irq_handler (void)
 LFCLK interrupt handler.

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 clock 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 and high-frequency clock 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 LFCLK driver.

After initialization, the LFCLK driver is in power off state (clock is 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 clock state.

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