Hi,
we have in production an old application developed with SDK13. The application size is growing and with the last update we discovered that during DFU bootloader update, the area reserved for FDS gets corrupted.
In bootloader the area appears to be reserved with
#define NRF_DFU_APP_DATA_AREA_SIZE 12288
and the application is using just 3 1024 bytes pages
#define FDS_VIRTUAL_PAGES 3
So information look to be coherent.
Neverthless the bootloader runs a dual bank page update, corrupting the area. At new startup the FDS_Init fails because no pages are available.
I have seen it clearly, dumping the memory before and after the DFU procedure. After the DFU procedure the pages that were reserved to FDS have been filled with the object code of the just uploaded application.
The result is not only that the app data is lost, but also the new application version is stuck, as we did not properly managed the FDS_init error.
The workaround we found was to artificailly increase the new application size, forcing the bootloader to run a single page update. Doing that the FDS pages are reserved and wverything works.
We are experiencing something that I suspect could be similar with a more recent SDK (17). In this case after the DFU update we loose bonding data. I suspect could be a similar issue as my understanding is that bonding data are stored thanks to FDS:
Should the setting of NRF_DFU_APP_DATA_AREA_SIZE be enough to protect the area? What are we doing wrong?
Thank you
Andrea