nrf_error_invalid_state(error 8) error on nrf52840 custom board, could it be caused by soldering issue?

I am building a nrf52840 custom board and testing the ble_app_blink_pca10056_s140 example from segger
I have a 32MHz crystal and a 32.768khz crystal
And I added the following to sdk_config.h
But I am getting nrf_error_invalid_state(error 8) error in ble_stack_init() - sdh_enable_request() - sd_softdevice_enable
Is there something wrong with my setup?
Or is it possible that I soldered the nrf52840 chip wrong and that is causing this problem?

#define NRFX_CLOCK_CONFIG_LF_SRC 2
#define CLOCK_CONFIG_LF_SRC 2
#define NRF_SDH_CLOCK_LF_SRC 2
#define NRF_SDH_CLOCK_LF_RC_CTIV 0
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 0
#define NRF_SDH_CLOCK_LF_ACCURACY 7

Parents Reply Children
  • The source code is the same as the example in nRF5_SDK_17.1.0_ddde560/examples/ble_peripheral/ble_app_blinky/pca10056/s140/ses. However, since the LED and button parts are different, as shown below, only this part of the code was commented out.

    int main(void)
    {
    // Initialize.
    log_init();
    // leds_init();
    timers_init();
    // buttons_init();
    power_management_init();
    ble_stack_init(); - error occurred
    gap_params_init();
    gatt_init();
    services_init();
    advertising_init();
    conn_params_init();

    // Start execution.
    NRF_LOG_INFO("Blinky example started.");
    advertising_start();

    // Enter main loop.
    for (;;)
    {
    idle_state_handle();
    }
    }
  • Hi,

    1. If you have external LF and HF crystals, why would you want to use the SYNT source for the LF clock?

    2. What is the internal capacitance of your LF and HF crystals? It's specified in the datasheet of the crystals. 

    3. What have you placed as the parallel load capacitors for the LF and HF crystals?

    regards

    Jared 

  • Crystal specs are 32Mhz +-30ppm, 8pF
    I think it might be a soldering issue
    How should I set the sdk_confg to use 32Mhz crystal and 32.768khz? I would really appreciate it if you could tell me the settings

Related