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

softdevice v2.0.0-8 issue: program stops at sd_ble_enable

Hi

I am trying to modify my application so that it uses the latest version of softdevice (v2.0.0-8.alpha) instead of the current one I am using (v2.0.0-7.alpha). My application works fine for softdevice v2.0.0-7; sd_ble_enable has been modified correctly to use the appropriate RAM base, and I have tested my application and everything works fine. However, when I try and use softdevice version v2.0.0-8, my application just doesn't start. Going through a debugger, it seems that my application stops exactly at sd_ble_enable(), and I can't figure out what the issue is because it does not go beyond this point.

Please note that I have modified the linker *.ld file appropriately so that my program flash starts at 0x1C000.

The SDK I am using is version 11.0.0-2.alpha and I am developing using gcc on an nRF52 EngB devkit.

Thanks

Parents
  • OK it seems that the problem was not in sd_ble_enable, but instead in sd_softdevice_enable. More specifically, due to the API changes with 2.0.0-8.alpha, enabling the softdevice has changed from

    sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL)
    

    to

    sd_softdevice_enable(&xtal_cfg, NULL)
    

    Where xtal_cfg is given by:-

    nrf_clock_lf_cfg_t xtal_cfg = {
    .source = NRF_CLOCK_LF_SRC_XTAL,
    .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_75_PPM
    };
    

    However I didn't catch that because my debugger was stopping at sd_ble_enable instead. Making the above change has resolved my issue.

Reply
  • OK it seems that the problem was not in sd_ble_enable, but instead in sd_softdevice_enable. More specifically, due to the API changes with 2.0.0-8.alpha, enabling the softdevice has changed from

    sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL)
    

    to

    sd_softdevice_enable(&xtal_cfg, NULL)
    

    Where xtal_cfg is given by:-

    nrf_clock_lf_cfg_t xtal_cfg = {
    .source = NRF_CLOCK_LF_SRC_XTAL,
    .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_75_PPM
    };
    

    However I didn't catch that because my debugger was stopping at sd_ble_enable instead. Making the above change has resolved my issue.

Children
No Data
Related