nrf52832 + DFU over BLE + External flash


We are trying to make DFU over BLE with external flash to overcome the large application size. This is what we are looking for:
- Use BLE to transfer the OTA image
- Since our application size id >250KB, planning to use an external flash to store the firmware
- Perform OTA when there is no critical task running

Environment:
- nrf52832
- nRF Connect SDK (v1.8.0)
- External flash (W25Q80DV) connected over SPI and tested successfully

We could find the guide on how to add support for DFU in the application at: devzone.nordicsemi.com/.../ncs-dfu

However, couldn't find how to use external flash for the DFU over BLE.

Could you share some sample or guide which shows OTA using BLE with external flash?

So far, we understand we need to do the following changes:
- Modify our application for DFU over Bluetooth. As mentioned in: devzone.nordicsemi.com/.../ncs-dfu
- Add a new file in our application folder pm_static.yaml and modify it.
- Add new child_image/mcuboot/prj.conf in our application. (Not sure if this is required)
- Is there any other configuration required in our application overlay file?

Thanks!

P.S. IMHO, DFU over BLE with external flash is a very common scenario and a good sample or blog around it would definitely help and may reduce some tickets. :)

  • Hi Edwin,

    I finally got this working on our custom board. The issue was with our custom board on how the Flash chip was powered. Because the Flash chip was controlled (ON/OFF) by the Nordic GPIO. Unless Nordic boots up and make that GPIO high flash was misbehaving. (This explains why Flash erase was not working during boot time but worked from the Application)

    We connected Flash with VCC directly (turning it ON always), and it solved the issue.

    I am attaching the code here for anyone's reference: peripheral_lbs_dfu-externalflash-w25q80dv-dfu-working-nrf52832.zip

    Code is compiled and tested on nRF52832, ncsv1.8.0 with the secondary partition on Winbond Flash (W25Q80DV)

    I just have one follow-up question: What would be the status of nRF GPIO during boot time? high/low/floating?

    Thanks!

Related