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

Module stop working in the bootloader

Hello.

I have a situation that when upload the softdevice, application and bootloader for some reason stays in the bootloader after some debug I found that we enter in function sd_softdevice_enable and stays there.

This is the function before I changed it. "err_code = sd_softdevice_enable(p_clock_lf_cfg, softdevice_fault_handler);"

I change p_clock_lf_cfg to NULL and the problem is gone.

So what this function do. What will be the reason to stay in that function.

The softdevice is 2.0.1 nRF52832_xxaa_s132 board pca10040 and the example that I used is based on ble_app_multirole_lesc.

Thank in advance.

Parents
  • Hi,

    If you provide NULL as the p_clock_lf_cfg argument, the LF clock will be configured to use the low frequency internal RC oscillator as clock source. The default value for p_clock_lf_cfg(NRF_CLOCK_LFCLKSRC) is to use the LF crystal as clock source. If you don’t have 32 kHz LF crystal on your board, or you have issues with the crystal, you could get stuck in the function. So if you don't have LF crystal on your custom board, your approach to use the NULL argument is correct.

Reply
  • Hi,

    If you provide NULL as the p_clock_lf_cfg argument, the LF clock will be configured to use the low frequency internal RC oscillator as clock source. The default value for p_clock_lf_cfg(NRF_CLOCK_LFCLKSRC) is to use the LF crystal as clock source. If you don’t have 32 kHz LF crystal on your board, or you have issues with the crystal, you could get stuck in the function. So if you don't have LF crystal on your custom board, your approach to use the NULL argument is correct.

Children
Related