NRF5340 SPI in-app DFU

Hello,

I want to develop a in-app DFU using SPI on nrf5340.

I plan to use dual section with MCUBoot

The app will need to write to secondary partition based on the SPI received data.

The question I have is how can the application interface with DFU/MCUboot to reboot, confirm & swap images (secondary to primary) once the transfer to flash is completed ?

Is there an example of custom DFU using SPI ?

Thank you

Parents Reply
  • Hi,

    Sorry for misunderstanding the question. 

    nroy8 said:
    My question is how can the application let the MCUboot know that there is a firmware has been written to the secondary partition of the flash ?

    When the image data transfer is completed, the application using the DFU target library must do the following:

    1. Call the dfu_target_done() function to finish the image data collection.

    2. Call the dfu_target_schedule_update() function to mark the firmware as ready to be booted. On the next reboot, the device will run with the new firmware.

    See the doc

    In addition, to inform MCUboot about a successful device firmware upgrade, the application must call the boot_write_img_confirmed(); function once it is sure that all intended functionalities work after the upgrade. Otherwise, it would revert back to the previous version as in this case

    -Amanda H.

Children
No Data
Related