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

nRF51422 using SDK demos causes PC runaway.

I am attempting to load a demo application from the nRF51 SDK v10 onto an nRF51422. Specifically the ANT broadcast tx demo. After loading soft device 210 v5 then programming it with the application build in IAR I get a PC running to 0xFFFFFFFE and the program halts.

The application starts deugging just fine. However upon hitting this line:

// Initialize SoftDevice.
err_code = sd_softdevice_enable(clock_source, softdevice_assertion_handler);

The program seems to start running code from the soft device after that however after just letting it free run it runs away to 0xFFFFFFFE.

In the debug log I get this output:
Tue Jul 03, 2018 14:08:51: Warning: T-bit of XPSR is 0 but should be 1. Changed to 1.
Tue Jul 03, 2018 14:08:51: HardFault exception.
Tue Jul 03, 2018 14:08:51:  
Tue Jul 03, 2018 14:08:51: Exception occured at PC = 0x20000078, LR = 0x6179
Tue Jul 03, 2018 14:08:51:  
Tue Jul 03, 2018 14:08:51: See the call stack for more information.

No matter what I do I am unable to get the program to continue past that point. I have loaded the softdevice and application using both IAR and nRF Go. I've read through docs to confirm my ROM and RAM boundaries are okay. After 2 days trying to crack this nut I am finding myself profoundly stuck.

Thank you if you took the time to read this and lend a hand! Let me know if you need any more information.

Parents
  • I've tried examples using both the 210 and 310 softdevices. And programming using both IAR and nRFgo Studio. But no matter what I do the code will always fail on "sd_softdevice_enable".

    Some info. I am using the 16MHz clock to synth the 32khz clock and I have this set in the application. The board im using doesn't have an external 32 khz clock. Could this be an issue for the ANT soft device? I noticed that it requires crystal accuracy of 50ppm or better and the option is titled "NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM". However I read somewhere that someone said that the accuracy of the synthed clock is based on the accuracy of the 16mhz clock. Is this correct? Will I need to get an external clock to get this thing working?

  • Your understanding is correct. If you want to synthesize the LFCLKbased on HFCLK, then you need to have a crystal HFCLK with good accuracy.

    The 16 MHz internal RC oscillator will not give you the needed accuracy to synthesize the LFCLK.

Reply Children
No Data
Related