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

OTA-DFU sometimes erases the application data unexpectedly

Hi,

We are facing an issue where the application data stored using FDS is erased one in a while after OTA-DFU multiple times.

This issue does not occur all the time, but it appears as often as 5% of the times.

We are developing the customized application based on the ble_peripheral/ble_app_uart example with the following environment:

  • Target Chip: nRF52832
  • SDK: v16.0.0
  • Soft Device: s132
  • Compiler: IAR

For the DFU, I used secure_bootloader exmaple and combined these 2 application to crated 1 .zip file by nrfutil to upload via nRF Tools app (either iOS or Android).

I have made sure that the following parameters are matched:

// In nrf_dfu_types.h
DFU_APP_DATA_RESERVED CODE_PAGE_SIZE * 3

// In sdk_config.h
FDS_VIRTUAL_PAGES 3

This problem occurs regardless of the application size to be uploaded, i.e. it doesn't matter if it's single-bank or dual-bank update.

Is there any possible factor this issue to happen only sometimes?

If anyone can suggest the way to resolve or to reproduce the issue with 100% frequency, it would be so helpful!

Thank you.

Parents
  • Hi,

    Do you have a flash dump from a device where this has happened? (Use the command "nrfjprog --readcode --readuicr dump.hex" to dump flash contents (including UICR registers) to a hex file named "dump.hex".) It should hopefully give some clues about what has gone wrong in flash. Especially if there has been written entries to all of the FDS flash pages before the update. If you also have the flash dump from before the failing DFU, that could be even better.

    If you use the debug bootloader, which has logging, that log from the update might also give some clues. Please note however that the debug bootloader is larger in size than the non-debug bootloader, so the location of application data will differ.

    What version of the nRF5 SDK are you using?

    Regards,
    Terje

Reply
  • Hi,

    Do you have a flash dump from a device where this has happened? (Use the command "nrfjprog --readcode --readuicr dump.hex" to dump flash contents (including UICR registers) to a hex file named "dump.hex".) It should hopefully give some clues about what has gone wrong in flash. Especially if there has been written entries to all of the FDS flash pages before the update. If you also have the flash dump from before the failing DFU, that could be even better.

    If you use the debug bootloader, which has logging, that log from the update might also give some clues. Please note however that the debug bootloader is larger in size than the non-debug bootloader, so the location of application data will differ.

    What version of the nRF5 SDK are you using?

    Regards,
    Terje

Children
No Data
Related