nrf52840 -> USB MSC + DFU

Hello,

I have a custom board, with nrf52840, and I am running a zephyr based application on it.

I was able to flash mcuboot on this, and I am able to perform both - buttonless (wait for a given time ) and button press (hold the "MSC" button on my board, and plug the board to via 'USB" to 'my computer, it enters DFU mode, and I am able to perform DFU), now I would like to perform DFU in the following manner:

  • When I press and hold "MSC", button on my board, and plug the USB to my computer, chip's filesystem mush mount on my computer, and should be able to access/browse the filesystem
  • I should then be able to transfer the DFU packet to the chip's filesystem
  • Once the transfer is complete, and I powercycle the board, mcuboot on nrf52 chip must identify that there is a new dfu packet available for update, and dfu update process must get triggered (it would be great if I could have some indication that DFU is in progress or is complete)
  • Once the update is complete, and I powercycle the board, board should now boot into my new application

I have looked at some older tickets (shared below) relating to USB MSC on nrf52, they show how to expose storage on nrf52 boards, but don't specifically talk about how to transfer files to the chip and trigger DFU

https://devzone.nordicsemi.com/f/nordic-q-a/104575/usb-mass-storage-sample-using-nrf7002-dk

https://devzone.nordicsemi.com/f/nordic-q-a/100104/config_app_msc_storage_ram-vs-flash_fatfs/428696

https://devzone.nordicsemi.com/f/nordic-q-a/105299/mcuboot-smp-external-flash-image-is-flashed-to-the-external-flash-but-fails-to-boot

Please let me know if any of my details are not clear or need more details from me.

Thank you,

Viresh Duvvuri

Related