Skip to content
Permalink
Browse files

drivers: clock_control: nrf: add SYNTH LFCLK clock source

Added option to have LFCLK synthesized from HFCLK. It is not low
power but ensures constant relation between HFCLK and LFCLK and
might be useful in certain scenarios (e.g. testing).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
  • Loading branch information...
nordic-krch authored and nashif committed Apr 15, 2019
1 parent 69b08e6 commit d2291c4b12baa12a0a9fd877c37cbbe4d3ab9b6b
Showing with 7 additions and 0 deletions.
  1. +4 −0 drivers/clock_control/Kconfig.nrf
  2. +3 −0 include/drivers/clock_control/nrf_clock_control.h
@@ -33,6 +33,10 @@ config CLOCK_CONTROL_NRF_K32SRC_RC
config CLOCK_CONTROL_NRF_K32SRC_XTAL
bool "Crystal Oscillator"

config CLOCK_CONTROL_NRF_K32SRC_SYNTH
depends on !SOC_SERIES_NRF91X
bool "Synthesized from HFCLK"

endchoice

config CLOCK_CONTROL_NRF_K32SRC_BLOCKING
@@ -21,6 +21,9 @@
#ifdef CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL
#define CLOCK_CONTROL_NRF_K32SRC NRF_CLOCK_LFCLK_Xtal
#endif
#ifdef CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH
#define CLOCK_CONTROL_NRF_K32SRC NRF_CLOCK_LFCLK_Synth
#endif

/* Define 32KHz clock accuracy */
#ifdef CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM

0 comments on commit d2291c4

Please sign in to comment.
You can’t perform that action at this time.