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
  • 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();
    }
    }
Children
Related