Skip to content

Commit d2291c4

Browse files
nordic-krchnashif
authored andcommitted
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 <[email protected]>
1 parent 69b08e6 commit d2291c4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

drivers/clock_control/Kconfig.nrf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ config CLOCK_CONTROL_NRF_K32SRC_RC
3333
config CLOCK_CONTROL_NRF_K32SRC_XTAL
3434
bool "Crystal Oscillator"
3535

36+
config CLOCK_CONTROL_NRF_K32SRC_SYNTH
37+
depends on !SOC_SERIES_NRF91X
38+
bool "Synthesized from HFCLK"
39+
3640
endchoice
3741

3842
config CLOCK_CONTROL_NRF_K32SRC_BLOCKING

include/drivers/clock_control/nrf_clock_control.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
#ifdef CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL
2222
#define CLOCK_CONTROL_NRF_K32SRC NRF_CLOCK_LFCLK_Xtal
2323
#endif
24+
#ifdef CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH
25+
#define CLOCK_CONTROL_NRF_K32SRC NRF_CLOCK_LFCLK_Synth
26+
#endif
2427

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

0 commit comments

Comments
 (0)