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

Softdevice assertion failed on new hardware

I have a simple central device where a gpio triggers the device to scan and connect to a peripheral.  This is running ok on the PCA10040, and also on a separate hardware platform that I had laying around that contains a BMD300 module with an nrf52832.  However, the new hardware board came in containing an nrf52832.  The code there will initialize and run, but on triggering a scan with sd_ble_gap_scan_start, it will immediately fail with:

    <error> app: SOFTDEVICE: ASSERTION FAILED: 0x00012A42

Where 0x12a42 is the PC which I added to the message.  All hardware platforms use the same code and sdk_config.h, the only thing I changed was the gpio pin #, polarity, and pullup.  There are no peripherals used, only connections are a gpio at pin 22 and AIN0 for measuring battery.  What could change hardware-wise that could cause the softdevice assertion?

Thanks,

Aaron

  • If your firmware is configured for NRF_CLOCK_LF_SRC_XTAL, you may want to try changing to NRF_CLOCK_LF_SRC_RC.

    jing

  • Hi, 

    Based on the PC value I would guess this is S132 v.6.0.0 ? If that is correct, it looks like some timing issues are causing the assert. As Jing suggested, you should try to use the RC oscillator as the clock source for the SoftDevice, and with the following configuration in sdk_config.h

    Snippet:

    //==========================================================
    
    // <h> Clock - SoftDevice clock configuration
    
    //==========================================================
    // <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

  • Thanks.  It turns out the be a hardware problem, the HF crystal was missing entirely on the initial board I got.

  • Hi Aaron

    I have same problem ,how you solve it?

  • Hi, there,

    We have the same problem with the same pc-value in SDK 14.02 and nRF52832 with rc configuration. we got the same asset error from soft device even if we tested another ble_peripheral examples in the SDK. please let me know the reason.

Related