How to store user data into flash on nrf9160 DK
Hey,
there is a Zephyr library you can use. Here's link to documentation.