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

sd_softdevice_enable hangs on nRF51822 when running example ble_app_hrs

I'm using SDK 11.0 and example\ble_central\ble_app_hrs_c

I have cut SB1 SB2 to disconnect the 32Khz crystal from the pca10028 and configured the example program to use the NRF_CLOCK_LF_SRC_RC. When loading the application on the pca10028 the sd_softdevice_enable ruturns with NRF_SUCCESS

When I try to load the same application on my custom board (with nRF51822) with 16Mhz crystal (no 32Khz crystal) the sd_softdevice_enable never returns.

  • Which softdevice version are you using? When migrating my code from s132 2.0.0-7 to 2.0.0-8, I had a hard fault when enabling the softdevice that I traced back to changes in support for the RC RTC. I found it's best to not use temperature calibration intervals. Also, it should be noted that many enumerations were changed between 2.0.0-7 and -8 or production code. You should review the migration docs to ensure you didn't miss one.

    Here is the config that worked for S132 2.0.0-8 on nRF52832-QFAAB:

    nrf_clock_lf_cfg_t rc_cfg = { .source = NRF_CLOCK_LF_SRC_RC, .rc_ctiv = 16, // check every 4 * 250ms .rc_temp_ctiv = 0, // do not use temp calibration }; err_code = sd_softdevice_enable(&rc_cfg, softdevice_fault_handler);

Related