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 Reply Children
  • Hi Abhijith,

    I think I may not have expressed myself clearly, the ESP32 is only used in my project as a chip to transfer the new firmware, and I'm now in a situation where when I reboot after putting the new firmware in the second slot of the nrf52833, the firmware checksumming of the MCUboot boot as well as the firmware swap doesn't take place.

    What should I do to implement the check, swap the new firmware in the second slot, and do I need to configure prj.conf or mcuboot.conf?

    Thanks.

  • Hello,

    Sorry, I mixed up a little bit with your query. Let me clarify a few things. You are using the ESP32 to transfer the new firmware image to nRF52833 (UART), and you succeeded in transferring the image and were able to place the image in the secondary slot. But when you reboot, the swapping is not working. Is this true?

    joe said:
    What should I do to implement the check, swap the new firmware in the second slot, and do I need to configure prj.conf or mcuboot.conf?

    Is this actually done by the bootloader. When you place the image inside the secondary slot and do a device reset, the bootloader will swap the image; see the image swapping section. This happens only if the image is valid. Bootloader will check the image; see this section.

    Kind Regards,

    Abhijith

  • Hi Abhijith,

    The problem has been solved.

    Thanks.

    Joe

Related