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

sd_softdevice_enable leads to hard fault on Rigado BMD-200

I used the app_template and built it with CrossWorks (nRF51 SDK 10) However, the call

SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_8000MS_CALIBRATION, NULL);

leads to

err_code = sd_softdevice_enable(clock_source, softdevice_assertion_handler);

and that in turn leads to a HardFault interrupt.

I also tried replacing the call with

SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM, NULL); // Alt 1
SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL); // Alt 2

Both lead to the same problem.

What does that mean and why is that happening?

I previously flashed the SoftDevice S110 v8 to the board and verified it with nRFGoStudio.

I have also made sure that my application gets flashed to the right address. I am using the following section placement macros in Crossworks:

FLASH_START=0x18000
RAM_START=0x20002000

... and I have verified it with Nordic's own PCA10028 board. Same thing here.

  • Do you have crossworks set up not to erase all before putting the app on the chip, otherwise you're blowing the softdevice away every time? Do you have your 'Entry Point Symbol' set to 'nonexistant' or some other function which doesn't actually exist, if no then you're bypassing the softdevice on-reset initialisation entirely and a hardfault is quite likely after that.

Related