File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_NRF5x Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 40
40
41
41
// Nordic Includes
42
42
#include " nrf.h"
43
+ #include " nrf5x_lf_clk_helper.h"
43
44
44
45
#include " NRFCordioHCIDriver.h"
45
46
#include " NRFCordioHCITransportDriver.h"
@@ -78,6 +79,14 @@ using namespace ble::vendor::cordio;
78
79
/* ! \brief Typical implementation revision number (LlRtCfg_t::implRev). */
79
80
#define LL_IMPL_REV 0x2303
80
81
82
+ #if MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_SYNTH
83
+ #define NRF_LF_CLK_SRC CLOCK_LFCLKSRC_SRC_Synth
84
+ #elif MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_XTAL
85
+ #define NRF_LF_CLK_SRC CLOCK_LFCLKSRC_SRC_Xtal
86
+ #elif MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_RC
87
+ #define NRF_LF_CLK_SRC CLOCK_LFCLKSRC_SRC_RC
88
+ #endif
89
+
81
90
// Note to implementer: this should be amended if the Cordio stack is updated
82
91
83
92
// The Nordic-specific baseband configuration
@@ -283,7 +292,7 @@ void NRFCordioHCIDriver::do_initialize()
283
292
}
284
293
285
294
/* configure low-frequency clock */
286
- NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos);
295
+ NRF_CLOCK->LFCLKSRC = (NRF_LF_CLK_SRC << CLOCK_LFCLKSRC_SRC_Pos);
287
296
NRF_CLOCK->EVENTS_LFCLKSTARTED = 0 ;
288
297
NRF_CLOCK->TASKS_LFCLKSTART = 1 ;
289
298
while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0 )
You can’t perform that action at this time.
0 commit comments