Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Writing/reading to non-volatile memory with the example asset tracker

Hello,

I am working with the Thingy91 device and the SDK v1.3.0 asset tracker example (I am not interested in upgrading at the moment). I would like to know how I can save a byte in non-volatile memory to read it when resetting/shutting down the device.
The purpose is to know the last state of the GPS before turning off the device so that at startup it will set the same state.

I would like a simple solution and I welcome feedback.

Thank you.

Raquel.

Parents
  • Hi,

    Take a look at the NVS sample at zephyr/samples/subsys/nvs. Sounds like it is exactly what you are looking for:

    This is a simple application demonstrating use of the NVS module for non-volatile (flash) storage. In this application, a counter is incremented on every reboot and stored in flash, the application reboots, and the reboot counter data is retrieved.

Reply
  • Hi,

    Take a look at the NVS sample at zephyr/samples/subsys/nvs. Sounds like it is exactly what you are looking for:

    This is a simple application demonstrating use of the NVS module for non-volatile (flash) storage. In this application, a counter is incremented on every reboot and stored in flash, the application reboots, and the reboot counter data is retrieved.

Children
No Data
Related