This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

sd_softdevice_enable loop

Hello,

I have a program that do an infinite loop in sd_softdevice_enable. How can i investigate ?

Loop is from 0x00009DEA to 0x00009DF2

Target is nRF52832 AA with nRF5_SDK_13.0.0_04a0bfd / s132_nrf52_4.0.2_softdevice.hex

  • What does nRF put to terminal? Maybe linker file need modification of RAM start address and size? If yes in terminal will be printed values to set.

  • I have tested on another board with a nRF52832, code works... but not on a Sparkfun nRF52832 board... strange. I have no USART on the faulty board this board, just JTAG. I will check tonight with RTT.

  • Hi,

    Are you using the exact same code for the Sparkfun board? Make sure that you have flashed the correct SoftDevice. As mentioned by Luk3, a reset from sd_softdevice_enable() is usually caused by wrong RAM start address( error-code NRF_ERROR_NO_MEM(=4) ).

    Note that a reset indicates that you are running into the error handler, where the default behavior is to do a reset. You should then debug in order to find the reason for the reset. See this post about debugging.

  • Hello, this is exactly where it loop, do someone have an idea please ?

    // Initialize the SoftDevice handler module.
        nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;
        SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL); <= infinite loop inside that
    
  • Maybe something is wrong LF clock source? RTT log could be really helpful. Check NRF_CLOCK_LFCLKSRC and try to switch to internal RC.

Related