Using UART DFU on NRF52833

Hello,

I am using NRF52833 chip and V2.3.0 SDKs,

I'm having a problem similar to Update code via UART instead of FOTA nRF9160.

According to the link, what I need to do is the following:

  1. Place app_update.bin in the secondary slot of the nRF52833
  2. Reset the nRF52833
    1. The mcuboot will then check the secondary slot and if it finds a valid image, it will swap it with the image in the primary slot and boot the new image
  3. Mark the image as "okay" to prevent rollback on next reset
    1. This can be done from the image itself using boot_write_img_confirmed()

Now i have sent app_update.bin one block at the time over UART from the ESP32 to the nRF52833 and put it in the secondary slot, but when I reboot with sys_reboot(), there is no image swapping and booting.

Unfortunately the above post doesn't go any deeper in the discussion, I have no idea how to implement step 2.

According to the post: Example For Using UART DFU on NRF52832 on both sides of communications, this could be related to MCUboot, so I added CONFIG_MCUBOOT=y to prj.conf, but it didn't work as I thought it would.Is it possible that I didn't enable MCUboot?

Thanks for your help.

Regards,

Joe

Parents
  • According to the log information:

    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Swap type: none
    I: Bootloader chainload address offset: 0xc000
    I: Jumping to the first image slot
    *** Booting Zephyr OS build v3.2.99-ncs2 ***

    After rebooting, the MCUboot does not seem to recognize the App firmware placed in the second slot.

    Actually, after I read the link:nRF Connect SDK Intermediate:Lesson8 Exercise 1, i think i need to achieve:

    mcumgr -c testDK image test <NEW_HASH>
    mcumgr -c testDK reset

    But esp32 doesn't support mcumgr,what do I need to do to implement similar checking, swapping operations?

Reply
  • According to the log information:

    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Swap type: none
    I: Bootloader chainload address offset: 0xc000
    I: Jumping to the first image slot
    *** Booting Zephyr OS build v3.2.99-ncs2 ***

    After rebooting, the MCUboot does not seem to recognize the App firmware placed in the second slot.

    Actually, after I read the link:nRF Connect SDK Intermediate:Lesson8 Exercise 1, i think i need to achieve:

    mcumgr -c testDK image test <NEW_HASH>
    mcumgr -c testDK reset

    But esp32 doesn't support mcumgr,what do I need to do to implement similar checking, swapping operations?

Children
No Data
Related