nRF5340 DFU both cores with external flash

My current project is using nRF5340, NCS 2.3.0, nRF5340-DK hardware, and development environment is VS code in Windows. At present I'm struggling to get DFU working to update both the app and net cores.

I think that what's happening now is this: the dfu_application.zip is uploaded to the DK board from mobile phone over BLE, is written somewhere (how can I verify that it went to exernal flash?), and the app core firmware is updated. Then the board gets stuck in a reboot loop in mcuboot. I believe it is attempting to update the firmware for the net core and failing, then retrying endlessly.

I discovered that I can break the reboot loop by running nrfjprog --qspieraseall. A manual reset after this step brings the board back up into a functional state. Based on a time stamp in a printk the app core updated but the net core is running its original firmware.

Help getting the DFU working to update firmware for both cores will be much appreciated!

0753.hci_rpmsg.conf0257.mcuboot.confmcuboot.overlaydts.overlay4061.prj.conf

Parents
  • Hi Sigurd,

    The project got busy and we needed to make progress on other features so OTA has been laid aside for the past few months. We're back to it now. I saw the invitation for the upcoming OTA webinar and decided I should get this dusted off so I'll be ready. :-)

    I've cloned your repo again and built the sample in the mcuboot_smp_ble_simultaneous directory. This is for nrf5340dk_nrf5340_cpuapp board in Windows 10 with SDK 2.5.0, on the command line in a bash shell opened via Toolchain Manager. This configuration worked - repeatedly! I've pushed an OTA update from nRF Connect on Android to the device multiple times and confirmed both nRF5340 cores are updated. This is all as per the README.md file in that repo.

    We're using the _ns configuration in our project though so I tried building the sample for nrf5340dk_nrf5340_cpuapp_ns. This doesn't work: mcuboot complained "Unable to find bootable image".

    My thoughts went first to partition manager. I've copied the generated partition.yml file from both builds (ns and not), copied the non-ns one to pm_static.yml, and started merging pieces from the ns version into my pm_static.yml. The result was inconclusive - I couldn't boil it down to a particular piece that reliably correlated to an image that booted or not.

    Do you have any suggestions about the bootable image problem, or (better) about the bigger issue of running OTA in combination with an _ns target?

Reply
  • Hi Sigurd,

    The project got busy and we needed to make progress on other features so OTA has been laid aside for the past few months. We're back to it now. I saw the invitation for the upcoming OTA webinar and decided I should get this dusted off so I'll be ready. :-)

    I've cloned your repo again and built the sample in the mcuboot_smp_ble_simultaneous directory. This is for nrf5340dk_nrf5340_cpuapp board in Windows 10 with SDK 2.5.0, on the command line in a bash shell opened via Toolchain Manager. This configuration worked - repeatedly! I've pushed an OTA update from nRF Connect on Android to the device multiple times and confirmed both nRF5340 cores are updated. This is all as per the README.md file in that repo.

    We're using the _ns configuration in our project though so I tried building the sample for nrf5340dk_nrf5340_cpuapp_ns. This doesn't work: mcuboot complained "Unable to find bootable image".

    My thoughts went first to partition manager. I've copied the generated partition.yml file from both builds (ns and not), copied the non-ns one to pm_static.yml, and started merging pieces from the ns version into my pm_static.yml. The result was inconclusive - I couldn't boil it down to a particular piece that reliably correlated to an image that booted or not.

    Do you have any suggestions about the bootable image problem, or (better) about the bigger issue of running OTA in combination with an _ns target?

Children
Related