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

nRF51 file Operation

Hello,

I wants to store data in file or store data as non volatile . I can't found any file related function.

Can any one help me how to store data as non volatile(Permanent).

Regards, Rajneesh

  • Hi Rajneesh,

    If you don't use the softdevice, you can access the flash directly using NVMC registers. You can have a look at the flashwrite example in SDK v11.

    If you use softdevice (which blocks access to NVMC) and if you simply want to store data to flash you can use the sd_flash_write() and sd_flash_page_erase() to write and erase. If you want to read you can read the address directly.

    If you use softdevice and want to use file system, you can try to use the fds library. You can have a look at this example and this documentation.

Related