Hello,
I want to reserve 1KB of flash memory in nrf5340 to save few configuration and keys, text etc.
I don't want these configurations to get wiped out afer a DFU.
How can I do this?
Hello,
I want to reserve 1KB of flash memory in nrf5340 to save few configuration and keys, text etc.
I don't want these configurations to get wiped out afer a DFU.
How can I do this?
Hi,
Take a look at the non-volative storage sample project at zephyr/samples/subsys/nvs
This sample shows how to setup and use the NVS system to store basic information in flash.
Thanks, I will look into that. Will these get wiped off after a DFU ?
Hello,
I can see 32KB of default storage partition.
Hi,
thank you for your patience. DFU does not wipe the storage partition, it only wipes the DFU slot. For example mcuboot_primary and mcuboot_secondary.
With NVS those should not be a problem. You can use nvs_calc_free_space to check the remaining space on a partition(note that this is a time consuming operation). And the NVS system handles organization of data for you, so there is no need to worry about overwriting existing data.
Here is a recent guide a colleague wrote about persistent storage of keys and data: Persistent storage of keys and data using the nRF Connect SDK
Hi,
thank you for your patience. DFU does not wipe the storage partition, it only wipes the DFU slot. For example mcuboot_primary and mcuboot_secondary.
With NVS those should not be a problem. You can use nvs_calc_free_space to check the remaining space on a partition(note that this is a time consuming operation). And the NVS system handles organization of data for you, so there is no need to worry about overwriting existing data.
Here is a recent guide a colleague wrote about persistent storage of keys and data: Persistent storage of keys and data using the nRF Connect SDK