Loading...
Searching...
No Matches
nrf_clock.h File Reference

nRF5x shared functions for configuration the system clocks More...

Detailed Description

nRF5x shared functions for configuration the system clocks

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file nrf_clock.h.

Go to the source code of this file.

#define CLOCK_HFXO_ONBOOT   0
 The high frequency clock (HFCLK) uses the internal oscillator per default.
 
void clock_init_hf (void)
 Initialize the high frequency clock (HFCLK) as configured in the board's periph_conf.h.
 
void clock_hfxo_request (void)
 Request the external high frequency crystal (HFXO) as HF clock source.
 
void clock_hfxo_release (void)
 Release the use of the HFXO.
 
void clock_start_lf (void)
 Start the low frequency clock (LFCLK) as configured in the board's periph_conf.
 
void clock_stop_lf (void)
 Stop the low frequency clock (LFCLK)
 

Macro Definition Documentation

◆ CLOCK_HFXO_ONBOOT

#define CLOCK_HFXO_ONBOOT   0

The high frequency clock (HFCLK) uses the internal oscillator per default.

Setting this define to 1 will enable the HFXO clock source on boot so it will always be active.

Definition at line 32 of file nrf_clock.h.

Function Documentation

◆ clock_hfxo_release()

void clock_hfxo_release ( void  )

Release the use of the HFXO.

If this was the last active request, the HFXO will be disabled

◆ clock_hfxo_request()

void clock_hfxo_request ( void  )

Request the external high frequency crystal (HFXO) as HF clock source.

If this is the first request, the HFXO will be enabled.

◆ clock_start_lf()

void clock_start_lf ( void  )

Start the low frequency clock (LFCLK) as configured in the board's periph_conf.

Calling this function while the LFCLK is already running will have no effect.

◆ clock_stop_lf()

void clock_stop_lf ( void  )

Stop the low frequency clock (LFCLK)

Note
Be sure that no module is using the LFCLK before you shut it down!