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

Why needs the soft device init so much time

Hello,

At the moment, we test the “Power Off” Mode for lower energy consumption of the nrf52 Preview Developement Kit (V1.0.0) in our project and I have a question about the initialization timings.

When the system wakes up from “Power Off” a reset is performed and we (re)initialize the whole system. This initialization takes about 250ms. In this 250ms we initialize the GPIO’s, peripherals… and the soft device. To investigate how long each call last I added some toggling of a GPIO Pin. The result is that the call “ble_stack_init()” to init the soft device and the BLE stack occupies nearly the whole 250ms.

  •    Our question is now, what the “ble_stack_init()” does exactly and why it needs that much time?
    
  •    Is there a possibility to speed it up?
    
Parents
  • Looks like I'm down to about ~1.1ms when using SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_250MS_CALIBRATION, NULL);
    Compared to ~380ms when using
    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL);
    Edit: It takes 250ms when using the external source because of a de-bounce timer. This timer is there to make sure the external crystal is settled, but it doesn't distinguish between a crystal or external "oscillator".

Reply
  • Looks like I'm down to about ~1.1ms when using SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_250MS_CALIBRATION, NULL);
    Compared to ~380ms when using
    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL);
    Edit: It takes 250ms when using the external source because of a de-bounce timer. This timer is there to make sure the external crystal is settled, but it doesn't distinguish between a crystal or external "oscillator".

Children
No Data
Related