nRF5340 Firmware Update from external NOR QSPI flash

Hi

I have gone through the following link and I have working firmware OTA update with BLE SMP.
https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu#http_dfu_ext_flash

But my device design also has a cloud connection via nRF9160. Following is the complete connection diagram.

Cloud<==HTTPS==> nRF9160 <== UART ==> nRF5340 <== QSPI ==> NOR flash

My requirement is to receive the firmware update file via HTTPS to nRF9160 and it will be transmitted to nRF5340 and eventually will be written in NOR flash.

My understanding is I will need to enable the QSPI flash access in Mcuboot by adding following lines to the file "/child_image/mcuboot/prj.conf"

Then write the firmware update file "app_update.bin" in the external NOR flash partition "mcuboot_secondary". File packets will be received over UART and then written via flash write operation. Once file write is complete I will need to restart the SOC.
Is my understanding correct? Also, will I need to update any other flag or message to start firmware update on reboot?

Many Thanks

  • nRF5340 QSPI peripheral is designed to support NOR flash. NAND flash is a different animal. Is it a typo?

  • Sorry for the typing error. Flash is NOR (MX25R1635)

  • Hi,

    Yes, your understanding seems correct. Note that this scheme is not officially fully supported yet, but there is a PR here that adds support for this:

    https://github.com/nrfconnect/sdk-nrf/pull/8839

  • I facing the following error while compiling the source code. I am not sure what setting I need to update. 

  • Do you have CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY set to y?

1 2 3 4