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

sd_softdevice_enable does not return

On one of our products, we are experiencing approximately 4% failures during production.  I traced the problem to be caused by function sd_softdevice_enable not returning.  This problem does not occur if I have a Segger JTAG probe connected or if the internal LF 32 KHz RC oscillator is used instead of the external crystal.  But with the external 32 KHz (20 ppm) crystal oscillator, about 4% of boards do not return from the sd_softdevice_enable function.  On the problem boards, our hardware engineers believe that this LF external oscillator is starting up normally.  They do not observe any startup differences between a good board or a bad board.  I would like to know the reasons why the function sd_softdevice_enable might not return.

  • Hi,

    Do you have a datasheet and part number for the 32kHz crystal? Have you checked that you meet the specifications:

    Best regards,
    Kenneth

  • Hi Kenneth,

    I am a firmware engineer and will have our hardware engineers verify our boards meet the above specification.  While this is happening, I would like to get more information for causes of why the function sd_softdevice_enable might not return.  Besides the LF crystal, are there other reasons that might cause this function not to return?  Or do you think this problem is primarily due to the LF crystal?

    Thanks,

    Wayne

  • Hi,

    The only 'wait state' in the softdevice enable is the wait for the lfclk started event. So likely the external crystal do not start as expected.

    Best regards,
    Kenneth

  • Hi Kenneth,

    We've looked at a number of units - some working, some non-working - and the 32kHz crystal starts-up identically in both scenarios (see attached screenshots). We've also verified that the parameters of the oscillator operation are accurate (frequency, amplitude, offset).

    Furthermore, swapping the crystal and capacitors does NOT cause a defective board to start functioning and moving the crystal+caps from a defective board to a good board doesn't affect functionality.

    What would be the next things to look at that could be causing a malfunction of the softdevice_enable function?

    Best,

    Eiad Jandali

    Hardware Engineer

    XTAL start-up on a functioning board

    XTAL start-up on a non-functioning board

  • What if you start it manually before softdevice init like this:

    NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSTAT_SRC_Xtal << CLOCK_LFCLKSTAT_SRC_Pos);
    NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
    NRF_CLOCK->TASKS_LFCLKSTART = 1;
    while(NRF_CLOCK->EVENTS_LFCLKSTARTED == 0)
    ;
    NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;

    Still waiting for datasheet and part number for the 32kHz crystal.

    Best regards,
    Kenneth

Related