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.

  • Thanks for the information. I also have another questions

    1. Which oscillator is used in the bootloader when it starts.
    2. Which oscillator is used when the module first start(power on)
    3. Which oscillator is used when connect to a j-link via (SWD)

    I am asking this because if I use this function with p_clock_lf_cfg and then start the j-link the problem is gone until power off the module. After the power is back the problem appears again.

Reply
  • Thanks for the information. I also have another questions

    1. Which oscillator is used in the bootloader when it starts.
    2. Which oscillator is used when the module first start(power on)
    3. Which oscillator is used when connect to a j-link via (SWD)

    I am asking this because if I use this function with p_clock_lf_cfg and then start the j-link the problem is gone until power off the module. After the power is back the problem appears again.

Children
Related