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

rtos - softdevice with nrf51422

Hi Support team,

I've ported succesfully chibios RTOS on the nrf51422 for month. I've also ported some drivers like I2C - UART - SPI- GPIOS and others... I can play with it make some apps that running perfectly.

Now I've started to integrate the softdevice but I get problems. In the main, first thing is done is to enable the softdevice.

sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_XTAL_50_PPM, softdevice_assert_callback);

But soon I call this function I get hardfault handler.

I made special attention about Ram/Flash usage and other recommandations. Chip is working well as I run sucessfuly the Hrm example.

Can you list all things that I need to check that can cause this issue?

Regards, Bruno

  • Hi, are you using a softdevice version previous to s110 version 6? There was unfortunately a bug with the older softdevices that could cause undefined behavior when using the PSP. This was however fixed in the 6.0 release. There's a migration document in the softdevice download folder if you haven't migrated to the latest softdevice already.

    Also, see that you mention the HRM ANT+ example, note that you need to have the ANT stack (either s210 or s310) to implement it.

  • Hi, thanks for you reply. So this bug was not report on PAN document. Yes, I'm using a softdevice version previous to version 6 as on the NRF51422_AAC0 it's impossible to program again the softdevice. It means that I need to buy a new Developpement Kit? Please let me know if it's possible to program again the softdevice on this revesion of the chip (NRF51422_AAC0)

    For the HRM exeample, I've already tested this exeample sucessfully with my garmin heart belt.

    Thanks, Bruno

  • Hi, the bug was listed in the release notes for s110 v.6.0. However, at first I just assumed you were using the BLE stack , so this doesn't apply to your case. Since you are running on a older revision you cannot update the ANT stack which is possible with the new kits. So yes, you'll need a new kit to update the softdevice . I've sent you a PM in regards to this.

  • NRF51422_AAC0 has a bug in the softdevice causing stack switching problem. I had the same problem with KEIL RTOS. I tracked it all the way to the door of the softdevice. I made a fix by myself for my application by adding some assembly code into KEIL's RTOS source code. And got around this problem for a short production run. Now with the latest SDK and AAEO version, everything is beautiful. Sure I will find more bugs :-D But so far so good.

  • Hi Paul, thanks for your reply. Thanks to confirming the bug in the AAC0 rev. I've now the new AAE0 device but I didn't get a chance to test it yet. I hope to make few new tests in the next few days. I'm currently integrating the call to the softdevice in the HAL. Soon my tests will be finish, I will post the status of them here. Regards, Bruno

Related