I'm using a custom board based on the Thingy52 board and firmware that uses the BMD-350 module containing the nRF52832.. I'd like to use the internal RC oscillator for the low frequency clock for BLE instead of the external crystal on the board. There are two places where this can be changed from what I've read.
1. pca20020.h
I've tried changing the NRF_CLOCK_LFCLKSRC definition to the following:
// Low frequency clock source to be used by the SoftDevice #define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_RC, \ .rc_ctiv = 16, \ .rc_temp_ctiv = 2, \ .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_500_PPM}
2. sdk_config.h
There's a section of code dealing with the clock that I've changed to the following as well:
// <e> CLOCK_ENABLED - nrf_drv_clock - CLOCK peripheral driver //========================================================== #ifndef CLOCK_ENABLED #define CLOCK_ENABLED 1 #endif #if CLOCK_ENABLED // <o> CLOCK_CONFIG_XTAL_FREQ - HF XTAL Frequency // <0=> Default (64 MHz) #ifndef CLOCK_CONFIG_XTAL_FREQ #define CLOCK_CONFIG_XTAL_FREQ 0 #endif // <o> CLOCK_CONFIG_LF_SRC - LF Clock Source // <0=> RC // <1=> XTAL // <2=> Synth #ifndef CLOCK_CONFIG_LF_SRC #define CLOCK_CONFIG_LF_SRC 0 #endif
Are any further definitions or settings needed to use the internal RC oscillator?
Thanks!