Added support for using the Low Frequency RC oscillator

This commit is contained in:
Jeremy Poulter committed 2018-04-14 20:25:21 +01:00
1 parent a07fbec136
commit 14482bc76a
1 file changed
+15
@@ -230,6 +230,21 @@ err_t AdafruitBluefruit::begin(uint8_t prph_count, uint8_t central_count)
.accuracy = NRF_CLOCK_LF_ACCURACY_20_PPM
#endif
};
#elif defined( USE_LFRC )
nrf_clock_lf_cfg_t clock_cfg =
{
// LXRC
.source = NRF_CLOCK_LF_SRC_RC,
.rc_ctiv = 8, //16
.rc_temp_ctiv = 2,
#if SD_VER < 500
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM
#else
.accuracy = NRF_CLOCK_LF_ACCURACY_20_PPM
#endif
};
#else
#error Clock Source is not configured, define USE_LFXO or USE_LFRC according to your board
#endif
VERIFY_STATUS( sd_softdevice_enable(&clock_cfg, nrf_error_cb) );