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

Store Data without Soft Device

I have to store some data in the flash. Because I need to keep data when I power off and power on the device. Now I found on the SDK 11.0/peripheral a falshwrite example. Is this for application which needs to store data, but dont use softdevice?

I know for pstorage. But I'm not sure, if I can use pstorage without softdevice.

Parents Reply
  • pg_size and page_num in the example is read from Factory information configuration registers (FICR). This is read-only information stored in the chip. The values will vary, depending on which chip you have. CODEPAGESIZE * CODESIZE will correspond to the total flash size in kB. On nRF52832, CODEPAGESIZE is 4096 and CODESIZE is 128, totaling 512kB flash. On nRF51 series, CODEPAGESIZE is 1024, while CODESIZE is 128 or 256 depending on your IC revison. You can store 4096 uint8_t values in on page on the nRF52832. Read from flash is shown in the example. You simply get the value by reading the data using the address. After power-up you need to read the the data from the flash-address. You must hardcode into your application which address to read on powerup.

Children
No Data
Related