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

How to keep the data stored in flash after DFU

Hi all:

I stored some settings in flash in the address 0x00077000 and this address is got by the function of pstorage_register().

However this area will be erased by my DFU, the DFU is refer the sample code of the project of dual_bank_ble_s132 in the SDK. V11. Is any setting or parameter needed be revised to avoid this area erased by DFU? My development enviroment: NRF52/IAR7.4/SDV2.01/SDK V11.0

Thanks…

Parents
  • Hi,

    The bootloader implementation in the example of the SDK splits the full area between softdevice end and bootloader start into two sections (dual DFU). The upper section is erased at the beginning of the DFU to store the new firmware. This is the reason your data is erased. To preserve a user data region below the bootloader the define for DFU_APP_DATA_RESERVED should be modified.

    In your case you should preserve at least three times the CODE_PAGE_SIZE to prevent erasing of the data above 0x77000.

    Regards Adrian

  • Hi , Yes ,the settings can be kept after modified DFU_APP_DATA_RESERVED. However, it cause new problem. If I just update this new DFU without others (Application and SoftDevice). My device will not enter DFU mode after update this DFU.. Is any item needed be modified?

    Thanks...

Reply Children
No Data
Related