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

NRF52810 softdevice issue on custom Board

Hi Everyone,

We are using NRF52810 with latest nRF5_SDK_16.0.0 and s112_nrf52_7.0.1_softdevice. We are able to program with ble_app_UART example on our prototype,

but BLE is not advertising. here are some snapshots of our project configuration.

APP_TIMER_V2
APP_TIMER_V2_RTC1_ENABLED
DEVELOP_IN_NRF52832
BOARD_PCA10040
CONFIG_GPIO_AS_PINRESET
FLOAT_ABI_SOFT
NRF52810_XXAA
NRF52_PAN_74
NRFX_COREDEP_DELAY_US_LOOP_CYCLES=3
NRF_SD_BLE_API_VERSION=7
S112
SOFTDEVICE_PRESENT

this are the processor configurations.

I have also changes the clock frequency configuration.

I am able to print "UART START " on above example. But facing BLE advertising issue. We get "NRF_BREAKPOINT_COND;" error some time.

Please give suggestion how can we start BLE adverting.

Thank you.

Parents
  • Hi,

    Can you add DEBUG in Preprocessor Symbol Defines, set Optimization Level to 1 and try to debug which function is causing error?

    You can look at the following links to debug your code:

    Link

    Link

  • I have added debug in Pre- Processor

    As well as while debugging i found insufficient RAM 

    Is there RAM Allocation issue?

    I have also tried with different flash and RAM allocations, but it still fails to advertise.

  • If it lands you on this warning then, you are allocating less RAM to your application.
    Try viewing exact size of the RAM displayed by NRF_LOG and allocate that size.

    Here is how you can view logs incase you have some trouble.

  • Hi,

    I think i resolved the RAM allocation issue. because i am not facing nrf_log_warning for maximum ram allocation.

    But i still not got BLE advertising packet  and device again goes into hardfault after 5 6 seconds.

    On call stack we are getting:

    app_error_fault_handler(uint32_t id = 1, uint32_t pc = 66800, uint32_t info = 0)

    [sdh_stack_observers1$$Base + 0x17ea0]

    The Id = 1 suggest NRF_FAULT_ID_SD_ASSERT fault.

    #define NRF_FAULT_ID_SD_RANGE_START     0x00000000            /**< SoftDevice ID range start. */

    NRF_FAULT_ID_SD_ASSERT    (NRF_FAULT_ID_SD_RANGE_START  + 1)          /**< SoftDevice assertion. The info parameter is reserved for future used. */

    and in Fault exception viewer:

    The processor has escalated a configurable-priority exception to HardFault.

    Exception occured at PC = 0xffffffff, LR = 0x0

    I am trying to figure out is there still RAM related issue like (malloc is exceeding RAM range)

    Could you please suggest any solution?

  • Hi,

    Yes, it looks like you have resolved the RAM allocation issue. This assertion indicates that the softdevice has been blocked and thus failed to meets its timing requirements. This can happen if you either single-step through the code with the debugger (debugger will halt CPU but not other peripheral such timer sources) or if you have interrupts in your app that used the highest interrupt priority ('0') which is reserved to the Softdevice. Have you made any changes to the ble_app_uart example you're using?

    Softdevice assertions are notified to the app in hardfault context.

Reply
  • Hi,

    Yes, it looks like you have resolved the RAM allocation issue. This assertion indicates that the softdevice has been blocked and thus failed to meets its timing requirements. This can happen if you either single-step through the code with the debugger (debugger will halt CPU but not other peripheral such timer sources) or if you have interrupts in your app that used the highest interrupt priority ('0') which is reserved to the Softdevice. Have you made any changes to the ble_app_uart example you're using?

    Softdevice assertions are notified to the app in hardfault context.

Children
  • Hi,

    We are using LF clock frequency for BLE UART advertising program testing. The used External crystal frequency  24MHz connected at XC1 and XC2 pins. It Didn't work.

    We also checked with 16MHz Crystal.

    We removed 32MHz crystal from PCA10040 Evalution kit and assembled on our prototype and it started advertising. 

    All testing is done on LF clock configuration.

    //==========================================================

    // <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

    Does NRF allow use of different Crystals frequency apart from 32MHz?

    Is there dependencies on External crystal though we used Internal oscillator?

  • Hi,

    You must have an external 32Mhz crystal with a tolerance of +-40ppm or better if you're going to use BLE. It's not optional like the LF crystal is.

  • Hi,

    Does this mean BLE soft device has some clock settings which assumes 32MHz crystal connected to the chip?

    I am asking this because now it is BOM change for us. will have to forward this to hardware team.

    Thanks.

  • Hi,

    The oscillator is designed for 32M. You have to update the BOM unfortunately. Please use our reference design in the PS as a reference. 

Related