Using USB mass storage device to flash nRF5340-DK does not work

Hello,

when I plug in my nRF5340-DK, a mass storage device called "JLINK" appears on my Windows PC.

Normally, it is possible to copy .hex files with firmware to the mass storage device, and it is flashed automatically via the integrated SEGGER JLink debugger of the development kit. I used this method successfully in the past with the nRF52832 development kit.

For the nRF5340-DK, this method seems not to work anymore. I cannot flash merged_domains.hex via the mass storage device. If I try, a FAIL.TXT file appears, that doesn't provide much useful info. What went wrong?

I tried flashing a Bluetooth project with a small Peripheral implementation:

CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="My Bluetooth"
CONFIG_BT_HCI=y

After some testing, I found out that I can flash build\zephyr\merged.hex and *\zephyr.hex (I didn't verify the data, but I didn't get the FAIL.TXT file with these).

Then, I tried the .hex files from the hci_rpmsg subproject: build\hci_rpmsg\zephyr\merged_CPUNET.hex, *\app.hex and *\zephyr.hex, neither of them can be flashed.

Could it be that only the application core can be flashed this way? And the network core cannot even be flashed separately (without flash data from both core's address spaces being merged into one file)?

It would be nice if you could solve this issue. As we want to provide a Nordic development kit to one of our suppliers so that he can implement a mobile app based on our characteristics / Bluetooth profile, but without receiving one of our Bluetooth devices (which are not yet finished). So, we need a convenient way to provide firmware updates to our supplier, which would ideally be just a drag & drop of firmware files to the USB drive, like before with the nRF52832.

By the way, I have a lot of touble working with the flashing tools Nordic Semiconductor provides for the nRF5340. The cores always lock up at unexpected times, and it is impossible updating only part of the Flash memory with leaving other partitions untouched. Unless the nRF Connect for VS Code plugin is used for flashing, which is no option for our supplier. Using the nRF Programmer or some command line based flashing tool always seems to overwrite the partitons I want to keep, and/or locking the MCU... so, using the USB mass storage device would be the most convenient way to provide firmware updates to our supplier...

Best regards,
Michael

Parents
  • Hi Michael just a few questions to get started. 

    1. Which version of the 5350dk are you using? I know there has been an issue for DKs with a nRF5340 as debugger(if the PCA number covers a SoC then we can presume its an older debugger and i expect drag and drop to work) 

    2. Which version of command line tools are you using?

    I expect some of the issue you have seen is related to app protect. My recommendation would be to use nrjfprog to flash the application or to use the nRF Connect for Desktop Programmer app. 

    Regards

    Runar

Reply
  • Hi Michael just a few questions to get started. 

    1. Which version of the 5350dk are you using? I know there has been an issue for DKs with a nRF5340 as debugger(if the PCA number covers a SoC then we can presume its an older debugger and i expect drag and drop to work) 

    2. Which version of command line tools are you using?

    I expect some of the issue you have seen is related to app protect. My recommendation would be to use nrjfprog to flash the application or to use the nRF Connect for Desktop Programmer app. 

    Regards

    Runar

Children
  • Hi runsiv,

    I'm using PCA10095, version 2.0.1 from 2022.36.

    Command line tools are 10.23.2 (downloaded/installed on November 2024).

    When is app protect normally activated on the MCU? Why does it activate automatically even when I don't want it to protect the core? Is there any way to disable app protect reliably?

    Like I mentioned before, the cores get locked automatically all the time, without me wanting them to get locked. I also have this issue on our self-produced nRF5340-based PCB's when accessing them with a SEGGER J-Link, newest software/driver version.

    Best regards,
    Michael

Related