I would like to know and understand the implication of what will happen, if i use the
I would like to know and understand the implication of what will happen, if i use the
Hello,
If you during production as first step execute an eraseall of the flash, then the flash can be considered all 0xFFFFFFFFF...FF before you program your application, and later when the application read from any unused flash area.
Kenneth
I'm working on released software. I would like to store some data in the NVM, so it can be used after factory reset. What is the best place to erase it. If the only option is DFU ? At present when I'm testing the software, i do eraseall. When firmware upgrade is executed, does it erase all the flash memory?
How much data do you want to store? There is space in UICR that can for instance be used for the purpose.
Kenneth
1. I need to store 2 x uint32_t bits of data.
2. The NVM should be initialized just once after the firmware is upgraded, for any further upgrade, it should hold the value.
3. The value is NVM should be updated for every factory reset, based on the internal count set.
4. The value in NVM will be read on every power cycle, so the value should not be corrupted due to not being initialized.
Could we achieve all the above mentioned points using UICR, or is NVM capable of achieving that all?
If I'm planning to use the NVM FDS backend SD,
1) which is the best place to initialize only once, and after which, it should only be updated for every factory reset.
2) how many times, can NVM be erased and re-written (since I'm clearing every time, before i update it)
3) Why do i have to call nrf_fstorage_init every time, before the value is read? if i don't call the init just before the read, it doesn't read the value.
Hello,
Data in UICR can not be changed during the product lifetime, so if you need to change the data then you can't use the UICR for the purpose.
The Flash endurance is minimum 10 000 Write/erase cycles.
If you want to store data in flash you can use FDS (or Fstorage) directly, there should be example for both in nRF5 SDK. Also check out the FDS_VIRTUAL_PAGES_RESERVED define:
// <o> FDS_VIRTUAL_PAGES_RESERVED - The number of virtual flash pages that are used by other modules.
// <i> FDS module stores its data in the last pages of the flash memory.
// <i> By setting this value, you can move flash end address used by the FDS.
// <i> As a result the reserved space can be used by other modules.
Kenneth