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

SOFTDEVICE_HANDLER_INIT duration

Hello,

I am doing some tests with the Heart Rate Service Sample Application for the nRF51822 evaluation board (PCA 10001). Inside the ble_stack_init(), there is this call: SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, false); And this call takes 350ms. Is there a way to decrease this duration ? I am still using v5_1_0 sdk.

Thanks,

Olivier

Parents Reply Children
  • Hi Håkon,

    I am also facing the same issue. for me ble_stack_init() is taking almost 500 msec. when i changed the NRF_CLOCK_LFCLKSRC_XTAL_20_PPM value to NRF_CLOCK_LFCLKSRC_RC_250_PPM_8000MS_CALIBRATION ble_stack_init() function taking 2.820 msec, it reduced to almost 497 msec.

    Since power consumption is also one of the main parameter, what is the average current consumption is for the above two macros ? what is the difference in current consumption ?

    One more thing, In my application, ble_stack_init() has the following function called.

    1. SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_8000MS_CALIBRATION, false);
    2. err_code = sd_ble_enable(&ble_enable_params);
    3. err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch);
    4. err_code = softdevice_sys_evt_handler_set(sys_evt_dispatch);

    can i optimize this further to reduce the time still more?

    Regards, Anand

Related