FOTA not working on nRF52840 dongle

I have tried using SMP svr example with MCUboot for FOTA, NRF Connect SDK version 2.9.0. The example is located in zephyr\samples\subsys\mgmt\mcumgr. This example is working perfectly on nRF52840DK, or nRF52DK, but on dongle it's not working, After download, the device doesn't start advertising, and after power off / on, it enters pre-programmed DFU mode.

The only change I have made to the the examples is, I created mcuboot.conf file inside sysbuild folder and added CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000, for partition manager.

I also selected overlay-bt.conf for extra kconfig fragment.

If I compile the same example with Zephyr V3.7.0, it is working. But also with Zephyr, the example breaks when I perform FOTA (on Android with nRF Connect app) and power off / on the device.

Is it even possible to use FOTA on nRF52840 dongle with the pre-programmed DFU bootloader?

Parents
  • Hi,

    I do not see a fundamental reason why you should not be able to use the nRF52840 Dongle with MCUboot as well provided that everything is built to start from 0x1000. I see there is an additional zero in the number you have used (0x10000) though. The dongle is not the best development platform though, as it lacks a debugger, so unless you have an external debugger to debug I would suggest testing and debugging on a DK if you have that available.

  • The solution to how to use nRF52840 dongle with FOTA.

    1. Partition the application and MCUBoot
      1. With Partition Manger (recommended)
        nRF Connect SDK v2.9.0 doesn't partition correctly, so we have to add partition file. Place pm_static_nrf52840dongle_nrf52840.yml to the root of the project (same location where CMakeList.txt file is and prj.conf file). This file should have the following inside:
        nrf5_mbr:
          address: 0x0
          end_address: 0x1000
          placement:
            after:
            - start
          region: flash_primary
          size: 0x1000
        mcuboot:
          address: 0x1000
          end_address: 0x11000
          placement:
            align:
              end: 0x1000
            before:
            - mcuboot_primary
          region: flash_primary
          size: 0x10000
        nrf5_bootloader:
          address: 0xE0000
          end_address: 0x100000
          placement:
            align:
              start: 0x1000
            before:
            - end
          region: flash_primary
          size: 0x20000
      2. Without Partition Manager (legacy)
        Add SB_CONFIG_PARTITION_MANAGER=n to sysbuild.conf to disable PM. This will use devicetree's partitions
    2. Download MCUBoot to the nrf52840 dongle using nRF Connect for Desktop.
      Make sure you download only MCUBoot! Don't download merged.hex file, or mcuboot and app files. If you download mcuboot and app, the device will go to nRF5 bootloader after power on reset (red LED pulsing).
    3. Download the app to the nrf52840 dongle using AuTerm.
      Enter the mcuboot recovery mode (before plugging into USB port, hold down the white button). Connect to the correct port (COMxx, /dev/ttyXXX), go under MCUmgr tab and select SIGNED binary file for upload. You can also check "reset after upload". If you don't select it, you have to power cycle the dongle for the app to start.
    4. Using nRF Connect phone app, or nRF Connect Device Manager phone app, you can now perform FOTA updates. Always use signed binaries for updates.
Reply
  • The solution to how to use nRF52840 dongle with FOTA.

    1. Partition the application and MCUBoot
      1. With Partition Manger (recommended)
        nRF Connect SDK v2.9.0 doesn't partition correctly, so we have to add partition file. Place pm_static_nrf52840dongle_nrf52840.yml to the root of the project (same location where CMakeList.txt file is and prj.conf file). This file should have the following inside:
        nrf5_mbr:
          address: 0x0
          end_address: 0x1000
          placement:
            after:
            - start
          region: flash_primary
          size: 0x1000
        mcuboot:
          address: 0x1000
          end_address: 0x11000
          placement:
            align:
              end: 0x1000
            before:
            - mcuboot_primary
          region: flash_primary
          size: 0x10000
        nrf5_bootloader:
          address: 0xE0000
          end_address: 0x100000
          placement:
            align:
              start: 0x1000
            before:
            - end
          region: flash_primary
          size: 0x20000
      2. Without Partition Manager (legacy)
        Add SB_CONFIG_PARTITION_MANAGER=n to sysbuild.conf to disable PM. This will use devicetree's partitions
    2. Download MCUBoot to the nrf52840 dongle using nRF Connect for Desktop.
      Make sure you download only MCUBoot! Don't download merged.hex file, or mcuboot and app files. If you download mcuboot and app, the device will go to nRF5 bootloader after power on reset (red LED pulsing).
    3. Download the app to the nrf52840 dongle using AuTerm.
      Enter the mcuboot recovery mode (before plugging into USB port, hold down the white button). Connect to the correct port (COMxx, /dev/ttyXXX), go under MCUmgr tab and select SIGNED binary file for upload. You can also check "reset after upload". If you don't select it, you have to power cycle the dongle for the app to start.
    4. Using nRF Connect phone app, or nRF Connect Device Manager phone app, you can now perform FOTA updates. Always use signed binaries for updates.
Children
No Data
Related