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

ble_stack_init nrf_sdh

I am inquiring about a custom device that hangs in the ble_stack_init(); and the result is a fatal error.

The custom device has an nRF52832 

The SDK is the SDK14

The project is a basic UART over bluetooth

The project will run without the fatal error on a nRF52832 DK

I have turned on debugging and have been given three statements:

<info> app: here
0> <debug> nrf_sdh: State request: 0x00000000
0> <debug> nrf_sdh: Notify observer 0x0002B474 => ready
0> <debug> nrf_sdh: State change: 0x00000000
0> <error> app: Fatal

Any help provided would be appreciated. 

  • I have run the rtc example from the SDK17.02. I have changed the led 1 from pin 17 to pin 27 within pca10040.h, so as to access a via on my board into the scope. I have looked into the sdk_config.h and see on line 65-67

    #ifndef NRFX_CLOCK_CONFIG_LF_SRC
    #define NRFX_CLOCK_CONFIG_LF_SRC 1
    #endif
    I presume the 4Hz signal apparent on my scope from pin27 of all five boards is run from the low frequency oscillator on my board?
  • Hi

    SDK v17.0.2 is a bug fix release replacing nRF5 SDK v17.0.0. You can see how to make older projects work for SDK v17.0.2 in the SDK introduction chapter. 

    You can also try making sure the load capacitors are set correctly for both crystals as well. The formula we're using to find the correct capacitor value is the following Ccap = CL (stated in the crystal datasheet) * 2 - 4 pF.

    So in your case, the correct capacitor values should be the following:

    HF crystal: Ccap = 12pF * 2 - 4pF = 20pF

    LF crystal: Ccap = 12.5pF * 2 - 4pF = 21pF (20 or 22pF should be fine)

    Best regards,

    Simon

Related