From 8326d777cc36af4086cc3d9fca00eff83557d710 Mon Sep 17 00:00:00 2001 From: Ben Whitten Date: Fri, 9 Jun 2017 10:23:27 +0100 Subject: [PATCH] nrf/drivers/bluetooth: Allow s132 to use LFCLK --- nrf/drivers/bluetooth/ble_drv.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nrf/drivers/bluetooth/ble_drv.c b/nrf/drivers/bluetooth/ble_drv.c index dab0e42fb2..c58c087335 100644 --- a/nrf/drivers/bluetooth/ble_drv.c +++ b/nrf/drivers/bluetooth/ble_drv.c @@ -122,6 +122,14 @@ uint32_t ble_drv_stack_enable(void) { uint32_t err_code = sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, softdevice_assert_handler); #endif // BLUETOOTH_LFCLK_RC +#else +#if BLUETOOTH_LFCLK_RC + nrf_clock_lf_cfg_t clock_config = { + .source = NRF_CLOCK_LF_SRC_RC, + .rc_ctiv = 16, + .rc_temp_ctiv = 2, + .xtal_accuracy = 0 + }; #else nrf_clock_lf_cfg_t clock_config = { .source = NRF_CLOCK_LF_SRC_XTAL, @@ -129,7 +137,7 @@ uint32_t ble_drv_stack_enable(void) { .rc_temp_ctiv = 0, .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM }; - +#endif uint32_t err_code = sd_softdevice_enable(&clock_config, softdevice_assert_handler); #endif