nrf/drivers/bluetooth: Allow s132 to use LFCLK
This commit is contained in:
parent
decb260890
commit
8326d777cc
|
@ -122,6 +122,14 @@ uint32_t ble_drv_stack_enable(void) {
|
||||||
uint32_t err_code = sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM,
|
uint32_t err_code = sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM,
|
||||||
softdevice_assert_handler);
|
softdevice_assert_handler);
|
||||||
#endif // BLUETOOTH_LFCLK_RC
|
#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
|
#else
|
||||||
nrf_clock_lf_cfg_t clock_config = {
|
nrf_clock_lf_cfg_t clock_config = {
|
||||||
.source = NRF_CLOCK_LF_SRC_XTAL,
|
.source = NRF_CLOCK_LF_SRC_XTAL,
|
||||||
|
@ -129,7 +137,7 @@ uint32_t ble_drv_stack_enable(void) {
|
||||||
.rc_temp_ctiv = 0,
|
.rc_temp_ctiv = 0,
|
||||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM
|
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
uint32_t err_code = sd_softdevice_enable(&clock_config,
|
uint32_t err_code = sd_softdevice_enable(&clock_config,
|
||||||
softdevice_assert_handler);
|
softdevice_assert_handler);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue