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

Can not enable Softdevice with nRF52 Preview DK

Hi,

I am trying to get my mesh running on the nRF52 Preview DK but calling

SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL);

will break my program. If I leave the Softdevice disabled, the rest of my code runs okay while constantly complaining, that the Softdevice is not enabled.

The debugger runs until it reaches the line with sd_softdevice_enable and then jumps to the Hardfault handler. How would I go on about debugging this? Is there an Errata that I am missing?

Thanks, Marius


I am using this GCC setup if that helps...: embeddedsoftdev.blogspot.de/.../ehal-nrf51.html

Parents
  • Hi

    Code stuck in SOFTDEVICE_HANDLER_INIT() usually indicates a faulty low frequency crystal. To see if this is an issue try to write:

    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM, NULL);
    

    instead to synthesize a low frequency clock from the 16MHz crystal. You can also try to start the LFCLK manually and check whether it starts or not.

    It can also be a SDK/Softdevice incompatibility. Have you set your RAM and ROM addresses in "Target Options -> Target" so that they match your Softdevice?

  • Thanks a lot, that was the right hint. I've enabled floating point ABI support for my project which caused the linker to complain because the CMSIS library that I am using was not compiled with FPU support. I recompiled that library with FPU support and my mesh as well. I had a wrong include as well, which I just fixed. The result is just great.

    My mesh seems to be working flawlessly with the nRF52 DK and some nRF51 Dongles. Didn't expect it to be that easy.....

Reply
  • Thanks a lot, that was the right hint. I've enabled floating point ABI support for my project which caused the linker to complain because the CMSIS library that I am using was not compiled with FPU support. I recompiled that library with FPU support and my mesh as well. I had a wrong include as well, which I just fixed. The result is just great.

    My mesh seems to be working flawlessly with the nRF52 DK and some nRF51 Dongles. Didn't expect it to be that easy.....

Children
No Data
Related