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

Sharing free flash memory region between Flash Data Storage and DFU

Hello,

We're intending to use the free flash region for two purposes: Flash Data Storage and DFU. The Flash Data Storage will be allocated a large number of pages (100 pages, around 400kB). We wish to use dual bank DFU so the application image will overlap with the region of free flash allocated to FDS. Any attempts to perform a DFU would corrupt the FDS region of memory, and so the FDS would not initialize properly (returning FDS_ERR_NO_PAGES).

It was suggested that we fully erase the FDS pages after a DFU, but there does not appear to be a clear all function provided by the FDS library. I assume we would have to manually call nrf_fstorage_erase and specify the starting address of the FDS flash region? Are there any methods provided by the library that can perform this safely?

Thank you for your assistance.

Related