NRF_ERROR_STORAGE_FULL after an OTA DFU

Hi

I am writing the firmware of a wearable device, based on nRF52832, which must support OTA DFU. I am using the peer_manager to manage paring and bonding, and the FDS library to access a relatively large amount of the free program flash (~120KB) as a non-volatile user storage space. Four parts – Bootloader, SoftDevice, Application, and the Settings table for the Booloader are merged into a single, combined HEX file for programing the device. During the development, I am testing on a nRF52DK Development Kit.

I see that the pm_manager uses the FDS and at least two pages are needed by the system. Also, having in mind the needed user flash data space I have specified FDS_VIRTUAL_PAGES to be equal to 33.

When the nRF52832 chip is programmed either from the IDE or by just drag-and-dropping the .HEX file to the virtual storage device of the nRF52DK board, the firmware runs fine. If I initiate OTA DFU and I reprogram the device with the same App-part of the firmware, the pm_init() in the initialisation phase returns an error – NRF_ERROR_STORAGE_FULL and the device restarts due to the subsequent APP_ERROR_CHECK line in the code.

I am aware of this post https://devzone.nordicsemi.com/f/nordic-q-a/61409/nrf_error_storage_full-after-dfu-update but it does not help me. In my case NRF_DFU_APP_DATA_AREA_SIZE is set to 12288, which should be sufficient for the FDS module to get initialised, shouldn't it? Erasing the flash pages, allocated to FDS followed by a NVIC_SystemReset() would be an option, but how can this be performed if the FDS is not initialised? 

Am I missing something? Why is that error generated? How can I get over this issue?

Regards,

Vankata

Parents Reply Children
No Data
Related