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

Getting started Zephyr BLE examples will not run on nRF5340 DK with nRF Connect SDK 6.1

This is a new install of NCS 6.1. Installed using nRF Connect Desktop v3.7.0 Toolchain Manager and connected to a new nRF5340 DK.

I followed the Getting Started, Running a First Test instructions here: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_gsg_ncs%2FUG%2Fgsg%2Ffirst_test.html

I was able to get the HRM demo application loaded and running using the nRF Connect Desktop Programmer using the download HEX files. It did ask me if I wanted to erase the two processors in the DK before programming the HRM files, which I did. The HRM loaded and ran on the DK.

I then used the File->Open nRF Connect SDK Project and loaded the Getting Started Zephyr-> Blinky application and compiled, downloaded to target and ran. It ran fine.

I repeated this process for Bluetooth example projects but I am unable to get any of the Short Range Bluetooth applications to run.

I tried beacon, peripheral_lbs and peripheral_hr for targets nrf534dk_nrf5340_cpuapp and nrf534dk_nrf5340_cpuappns these projects compiled with no problem but none of these projects will run on my nRF5340 DK when built and loaded from SES.

The serial terminal shows zephyr booting and then it hangs
*** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***

I am getting a warning message each time I run Target->Download Zephyr/merged.hex that says the build is out of date and has to be rebuilt, although I just built it! Not sure if this is causing the issue?

Can you please help me fix this problem?

Parents
  • Hi,

    If you haven't already, please download and install the nRF Command Line Tools.

    Then open Toolchain Manager, click the "..." button next to v1.6.1, and click "bash". Then run these two commands:

    nrfjprog --recover --coprocessor CP_NETWORK
    nrfjprog --recover

    Afterwards, try flashing one of the bluetooth examples again.

  • I think I have figured this out. The Getting Started Guide is not clear. I followed the instructions for Building and Programming an Application in the GSG, but this does not work for the Dual core nRF5340. You have to go to the section Building and Running a Sample in the nRF5340 documentation, which takes some searching to find. Follow the instructions on adding a multi-image build project to the solution.

    Another important detail is the Zephyr Bluetooth samples don't work on the nRF5340 so you have to load a Nordic Sample. In SES run the File->Open nRF SDK Project tool. Don't select the project from the list, instead Click the ... at the right and browse to the Nordic samples. E.g. for the peripheral_lbs sample, browse to: \v1.6.1\nrf\samples\bluetooth\peripheral_lbs

    Once I followed the above steps, I could build the peripheral_lbs sample, add a project to download the network core hex file for the peripheral_lbs sample to the target and then download the application hex file to the application core on the target.

  • The Zephyr bluetooth samples work fine on the nRF5340, but you flash the cores separately. So build and flash zephyr/samples/bluetooth/hci_rpmsg for nrf5340dk_nrf5340_cpunet, then build and flash the bluetooth application for cpuapp/cpuappns.

Reply Children
No Data
Related