NRF5340-DK BLE examples fail to initialize

I am trying to use a 5340 BLE example project in VSC as a starting point.  I have two NRF5340-DK boards, both 2.0.0.  Whatever example I try, bt_enable always fails.  For example, the peripheral_uart example fails with HCI driver open failed.  I've tried the LBS and coded-hr examples as well.

I have captured a video of the process here:

https://youtu.be/XV-GMkifqJU

It's been a couple days, but I think the first time I tried the UART example it actually worked.  This was on a DK board that already had a programmed NETCPU with the RPC code.  But after doing a board erase, I could never get any of the BLE examples working again, so it almost looks like the NETCPU isn't getting loaded.

Parents Reply Children
  • Hi Torbjørn,

    I have the same issue !

    I've just reinstall the latest nRF Connect SDK (v2.3.0) and still have the issue. I've set the HEAP, WORKQUEUE_STACK and RPC_THREAD_STACK sizes to 8192. The project builds successfully, but still the same error at runtime : 

    [00:00:01.457,550] <err> bt_hci_driver: Endpoint binding failed with -11
    [00:00:01.457,580] <err> bt_hci_core: HCI driver open failed (-11)

    So for me the trick of deleting the ncs folder does not work...

    I've tried to track the issue and the error appears at line 3731 of hci_core.c:

    err = bt_dev.drv->open();
    where the open() method returns the value -11 (No more contexts ?)

    I also have checked that both core are flashed using nRF Connect Desktop. It seems to be OK (see image below)
    FLASH nRF5340
    Have you any idea to solve this problem ?
    Kind Regards
    Patrice
  • Hi Patrice

    Next time please open a new ticket, and add a link to the old one, so we can keep the different cases separate. 

    What version of the nRF5340DK do you have? 

    Which example are you trying to run?

    Could you try to do a recover of the board and flash it again to see if it makes a difference? 

    The quickest way to do a recover is to run nrfjprog --recover from the command line. 

    Best regards
    Torbjørn

  • Hello Torbjørn,

    Sorry for the ticket... Do you want me to open a new ticket ?

    I'm using a nRF5340-DK v2.0.0 with the latest nRF Connect SDK (v2.3.0) and I'm running the Peripheral UART example from <ncs_path>/nrf/samples/bluetooth/peripheral_uart

    ... and no difference after a recover, still the same error:

    [00:00:00.270,599] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.270,629] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.270,629] <inf> fs_nvs: data wra: 0, 0
    [00:00:01.270,935] <err> bt_hci_driver: Endpoint binding failed with -11
    [00:00:01.270,965] <err> bt_hci_core: HCI driver open failed (-11)

    I investigate a bit more where the problem comes from... In my configuration, the line 311 of rpms.c returns error -11 !

    err = k_sem_take(&ipc_bound_sem, IPC_BOUND_TIMEOUT_IN_MS);

    Kind Regards

    Patrice

  • Hi Patrice

    Patrice Rudaz said:
    Sorry for the ticket... Do you want me to open a new ticket ?

    No need, just a heads up for next time Wink

    It seems somehow the network core is not properly programmed. 

    You made no changes to the sample at all, simply built it for the nrf5340? 

    Which board did you build for? 

    Are you able to show me the terminal log you get when you flash the example from VSCode? 

    Could you run nrfjprog -v from the command line and let me know what you get? 

    Best regards
    Torbjørn

  • Hi Torbjørn,

    - I had to modify the prj.conf to let it compile for the nRF5340, as described in the documentation (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/rpc_host/README.html)

    - I build the project for the nRF5340_nrf5340dk_cpuapp, the part for nrf5340_net core is done automatically 

    - Here is the terminal log of VSCode:

    Flashing build to 960157976
    /bin/sh -c west flash -d /opt/nordic/ncs/v2.3.0/nrf/samples/bluetooth/peripheral_uart/build --skip-rebuild --dev-id 960157976

    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: Flashing file: /opt/nordic/ncs/v2.3.0/nrf/samples/bluetooth/peripheral_uart/build/zephyr/merged_domains.hex
    -- runners.nrfjprog: /opt/nordic/ncs/v2.3.0/nrf/samples/bluetooth/peripheral_uart/build/zephyr/merged_domains.hex targets both nRF53 coprocessors; splitting it into: /opt/nordic/ncs/v2.3.0/nrf/samples/bluetooth/peripheral_uart/build/zephyr/GENERATED_CP_NETWORK_merged_domains.hex and /opt/nordic/ncs/v2.3.0/nrf/samples/bluetooth/peripheral_uart/build/zephyr/GENERATED_CP_APPLICATION_merged_domains.hex
    [ #################### ] 12.526s | Erase file - Done erasing
    [ #################### ] 1.460s | Program file - Done programming
    [ #################### ] 1.484s | Verify file - Done verifying
    [ #################### ] 6.858s | Erase file - Done erasing
    [ #################### ] 1.672s | Program file - Done programming
    [ #################### ] 1.692s | Verify file - Done verifying
    Applying pin reset.
    -- runners.nrfjprog: Board with serial number 960157976 flashed successfully.
    * Terminal will be reused by tasks, press any key to close it.

    - And the result of nrfjprog -v:

    patrice@rutMBProT peripheral_uart % nrfjprog -v
    nrfjprog version: 10.21.0 external
    JLinkARM.dll version: 7.80c

    Kind Regards
    Patrice

Related