This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Change Clock Source NRF52832 app beacon example

Hello,

I am working with the newest revision of the nRF52 Development Kit and the app_beacon example. I try to change the clock source for the following code:

nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;

// Initialize the SoftDevice handler module.
SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);

I changeg the NRF_CLOCK_LFCLKSRC define in the file pca10040.h to

#define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_RC,            \
                                 .rc_ctiv       = 0,                                \
                                 .rc_temp_ctiv  = 0,                                \
                                 .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}

It is compiling with no errors but execution stops at

    err_code = bsp_init(BSP_INIT_LED, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER), NULL);

what else do I have to change to select the RC clock?

Related