I am using nvs_init(), nvs_read(), nvs_write() calls to store and retrieve user data. Everytime I flash a new image I use the following commands:
# nrfjprog -e -f nRF91
# west flash
I have to specify -e -f flags. If I omit those flags, the unit will not boot and gets stuck at the following logs
SPM: NS image at 0xc000
SPM: NS MSP at 0x2002c120
SPM: NS reset vector at 0x13b2d
SPM: prepare to jump to Non-Secure image