Soft device error

Hi,

I am in the process of evaluating the nRF52840 and have the Nordic nRF82840 DK development board.

I am using the Segger Embedded Studio for evaluation.

The following examples are being used:-

GitHub - NordicPlayground/nrf52-ble-app-uart-long-range

The project compile after some interaction with Segger Tech support, but not running correctly.

I have put the board into debug mode, and get the following the attached error.Softdevice error.pdf

Segger are saying this is a Nordic issue and not compiler.

Any suggestions would be gratefully received.

Best Regards

Paul

  • Hi,

    I have managed to cure the issue. I used the nRF connect programmer and erased from there. Working now.

    Paul

  • Hi Paul Glad to hear that. You can also do as the error log suggests, and run an nrfjprog --recover command from your command line with the nRF Command Line Tools.

    Best regards,

    Simon

  • Hi. I am making progress but need a bit more help. I have produced a board which is based around the nRF52840 DK Dev board. The aim is to develop code initially on the dev board and then transfer over to the designed board and ensure both work the same. I have some simple code where the unit advertises and also toggles an output (to show activity). I load this on the dev board with no issues, but on my board it appears to not run at all. The only difference I can see is the dev board has an optional 32.768KHz crystal whereas mine doesn't. The datasheets I have do not reference anything about the crystal but I assume there are configuration bytes which set up crystals etc? Is there a data sheet which specifies registers at low level?

    Best Regards

    Paul

  • Hi

    This is indeed likely to the 32.768kHz crystal  not being present on your board. In the nRF5 SDK, you need to configure the project to use the internal RC oscillator as an LF clock source instead of the external LF crystal which is used by default. Make sure the following configs in sdk_config.h are set to the following values:

    // <o> NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
     
    // <0=> NRF_CLOCK_LF_SRC_RC 
    // <1=> NRF_CLOCK_LF_SRC_XTAL 
    // <2=> NRF_CLOCK_LF_SRC_SYNTH 
    
    #ifndef NRF_SDH_CLOCK_LF_SRC
    #define NRF_SDH_CLOCK_LF_SRC 0
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
    #ifndef NRF_SDH_CLOCK_LF_RC_CTIV
    #define NRF_SDH_CLOCK_LF_RC_CTIV 16
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
    // <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
    // <i>  if the temperature has not changed.
    
    #ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
     
    // <0=> NRF_CLOCK_LF_ACCURACY_250_PPM 
    // <1=> NRF_CLOCK_LF_ACCURACY_500_PPM 
    // <2=> NRF_CLOCK_LF_ACCURACY_150_PPM 
    // <3=> NRF_CLOCK_LF_ACCURACY_100_PPM 
    // <4=> NRF_CLOCK_LF_ACCURACY_75_PPM 
    // <5=> NRF_CLOCK_LF_ACCURACY_50_PPM 
    // <6=> NRF_CLOCK_LF_ACCURACY_30_PPM 
    // <7=> NRF_CLOCK_LF_ACCURACY_20_PPM 
    // <8=> NRF_CLOCK_LF_ACCURACY_10_PPM 
    // <9=> NRF_CLOCK_LF_ACCURACY_5_PPM 
    // <10=> NRF_CLOCK_LF_ACCURACY_2_PPM 
    // <11=> NRF_CLOCK_LF_ACCURACY_1_PPM 
    
    #ifndef NRF_SDH_CLOCK_LF_ACCURACY
    #define NRF_SDH_CLOCK_LF_ACCURACY 1
    #endif

    Let me know if you've moved to the nRF Connect SDK, and need instructions on how to config the LF clock source there.

    Best regards,

    Simon

  • Thanks Simon,

    I am using Visual Studio for the development, and can't find reference to these settings.

    Here is a screen shot of the files I have access to in the project.

    Best Regards

    Paul

Related