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

save and update flash data on reboot

What is the max amount of data that can be saved in records in fds?

When we do a dfu, is the data conserved or not?

How to vary the size of the records if possible?

I am trying to store 6kb data of  array of structs data.Previously i used a flashwrite to save, but it didn't help.What is the way to save such a type of data in flash memory

  • Hi,

    What is the max amount of data that can be saved in records in fds?

    The data size of one FDS record must be less than the size of a virtual FDS flash page minus the 8 byte FDS flash page header and the 12 byte record header. For more information, see Maximum Length in the FDS documentation.

    When we do a dfu, is the data conserved or not?

    During DFU, application data is conserved according to settings in the bootloader. This goes for both FDS, fstorage, and otherwise stored application data within the flash area intended for the application. For more information, see Preserving application data in the DFU bootloader documentation.

    How to vary the size of the records if possible?

    In FDS, records have the size you decide to give them on creation. Each record has a size that is independent of other records.

    I am trying to store 6kb data of  array of structs data.Previously i used a flashwrite to save, but it didn't help.What is the way to save such a type of data in flash memory

    For that kind of storage fstorage is probably a better choice, as it gives you direct access to addressable regions of flash. Note also that 6kb is a relatively large amount of data, and that flash pages can only be erased one flash page at the time. Data can be written in smaller chunks down to four byte chunks (one word), but in order to rewrite a word you must erase the whole flash page.

    Regards,
    Terje

  • Hi,

    If you have any questions regarding NFC and the Writable NDEF Message Example, then I suggest that you open a new thread for that, with a title reflecting the question. It has little to do with "save and update flash data on reboot". The "writing" in that example is communicating over NFC. It is not about writing to Flash.

    Regards,
    Terje

Related