Configuration storage delay

Ok, so i mixed both secure storage and rtc. I have 2 bytes which are some config in order for device to function, and are written only once, used secure storage for that. And 3 bytes which are current operation mode of the device, used rtc for that. Even if rtc drains and does not hold data anymore the device still functions but resets to initial values upon restart.