This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Dual Bank DFU in NRF52805 using an external flash

Hi Nordic,

I have an NRF52805 board [ from Raytech] and I am implementing all my application using SDK v15.1.0.

As of now, I have implemented my application using the ble_app_uart service and it works perfectly with buttonless DFU!

but my problem is NRF52805 has only 192kb of flash and my code size is around 135kb and in near future, I will include more services and it will take more flash size.

and, therefore dual bank is not possible with this amount of flash size. So I have used W25Q32 [4MB NOR Flash] flash IC to store the new image.

I have also successfully tested the basic read-write function in flash using SPI.

Now, I don't know how to store the new image in flash, and

- what kind of and where I have to make changes?

Thanks in advance

Dipak

Parents
  • Hi Dipak, 

    We currently don't have an example on how to use external flash for doing DFU. What you need to do is to add a new backend to the fstorage to store data in external flash instead of the internal flash. It's similar to the nrf_fstorage_nvmc.c and the nrf_storage_sd.c . But you need to write your own library to access SPI flash instead. This would require some study on how the DFU bootloader works and how fstorage works. 

    But may I ask do you have to use nRF52805 and the W25Q32 in your design ? The DFU dual bank issue can be solve by simply use a nRF52832 which has 512kB of flash. 

  • But may I ask do you have to use nRF52805 and the W25Q32 in your design? The DFU dual bank issue can be solved by simply use an nRF52832 which has 512kB of flash. 

    Yes, I have NRF52805 & W25Q32 in my design.

    Right now, I have no option except external flash.

  • Hi Dipak, 

    nrf_dfu_req_handler_init () is called to initialize the dfu_req_handler but I don't see the reason you need to modify that. What you need to modify is what I mentioned before to change the backend of the fstorage module. So instead of the nrf_fstorage_sd.c , you need to define your own nrf_storage_spi.c so that it handle the flash operation with the external SPI interface, not the internal flash. 

    nrf_dfu_req_handler_init () initializes the nrf_dfu_flash module, but what you need to modify is the fstorage which is the lower level of the nrf_dfu_flash. 

Reply
  • Hi Dipak, 

    nrf_dfu_req_handler_init () is called to initialize the dfu_req_handler but I don't see the reason you need to modify that. What you need to modify is what I mentioned before to change the backend of the fstorage module. So instead of the nrf_fstorage_sd.c , you need to define your own nrf_storage_spi.c so that it handle the flash operation with the external SPI interface, not the internal flash. 

    nrf_dfu_req_handler_init () initializes the nrf_dfu_flash module, but what you need to modify is the fstorage which is the lower level of the nrf_dfu_flash. 

Children
No Data
Related