8000 nrf5/sdk: Adding support for initializing the bluetooth stack using R… · boneskull/circuitpython@e95ec1a · GitHub
[go: up one dir, main page]

Skip to content

Commit e95ec1a

Browse files
committed
nrf5/sdk: Adding support for initializing the bluetooth stack using RC oscillator instead of crystal. If BLUETOOTH_LFCLK_RC is set in CFLAGS, this variant of softdevice enable will be activated.
1 parent c300e3f commit e95ec1a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nrf5/sdk/ble_drv.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,13 @@ uint32_t ble_drv_stack_enable(void) {
109109
#endif
110110

111111
#if (BLUETOOTH_SD == 100) || (BLUETOOTH_SD == 110)
112+
#if BLUETOOTH_LFCLK_RC
113+
uint32_t err_code = sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION,
114+
softdevice_assert_handler);
115+
#else
112116
uint32_t err_code = sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM,
113117
softdevice_assert_handler);
118+
#endif // BLUETOOTH_LFCLK_RC
114119
#else
115120
nrf_clock_lf_cfg_t clock_config = {
116121
.source = NRF_CLOCK_LF_SRC_XTAL,

0 commit comments

Comments
 (0)
0