Unable to flash nrf5340.bin in the Getting Started example

Hi @Yang1991
I figured out the problem you are having. Here is the summery. Hope it helps:

The problem lies in the missing binary for the network core. The nRF5340 SoC has two M33 core. One for application firmware and one for network firmware (Bluetooth). Binary that is produced by Edge Impulse studio is only for application core, but it contains the Bluetooth initialisation. If the network core firmware is missing the Bluetooth initialisation will fail and application will stop at the beginning.
Firmware upgrade for this issue is coming, and until it lands in production the workaround can be to flash the network core in addition to provided application firmware. If building an application locally network core firmware can be found in the next path: build/hci_rpmsh/zephyr/zephyr.hex or in this message attachment.
Easiest way to flash both firmwares can be using nRF Connect for Desktop, Programmer application.

  1. Connect development kit to your computer
  2. Open the nRF Connect for Desktop Programmer application
  3. Connect to the board
  4. Drag and drop attached both attached file and hex file from studio zip (it should look like in the picture)
  5. Click Erase & write
    After this you can drag and drop the application binary from zip as before.

https://drive.google.com/drive/folders/1KjxZ59Ds1CwToNwHaECYXhfifweXmus5?usp=sharing

2 Likes

Thanks for the update!
The files did resolve the issue.
Everything works now.

1 Like

I’m having the same issue.

Can you please explain step 4 and 5?

I’m flashing zephyr.hex and nrf5340-dk.hex. That is it right? I don’t know what is studio zip. And I also can’t see no picture in your comment.

You also mention that I can drag and drop the binary after step 4 and 5 but isn’t the firmware already flash after these steps? Why would I need to do that?

Hi @pedromarinho94 ,

Here is more detailed explanation:
4. Drag and drop both firrmware that you will download from my original post (google drive link) and the one you will download from studio after deployment is done. You should drag and drop them as it is described in the video you get after the studio finish deployment and downloads the zip. (video will pop up.)
5. In the same place you did previos point (nRF Connect for Desktop → programmer application) there is a button “Erase and Write” click on that and it should be done properly. Both firmwares will be flashed one into application core and one into network core.

hope it is more clear now, if not let me know.

I had the same problem as Yang1991, and it seems times have changed and the above solution no longer works. The root cause is the same, a missing or bad network core image.

NCS 2.4.0 is now used by Edge Impulse, so the out-of-band network core hex file provided @vojislav no longer works.

Fortunately, the solution is a bit simpler. Instead of flashing zephyr.hex to the device, flash merged_domains.hex. Programmer v4.3.0 will accept this file and program both cores properly.

I tried dragging this file to the JLINK drive and it failed.

Btw, on my device I had to select the 1st listed serial port, not the last. Whichever port is receiving log messages is the one that the daemon needs to use.

Hope this is helpful.

Hi @mcbailey

you are right I will make sure to update the zip produced by our platform that contains the binaries so it includes merged_domains.hex file. That would make things easy.

unfortunately this file cannot be drag and drop to the jlink drive, it needs to be flashed with Programmer app as you suggested.

Thanks for the update and I will let know everyone when the zip is updated.

Best,
Vojislav