2018-05-15 01:34 PM
Hi.
I was trying to end my project but I faced a problem.
In my project, the user enters a number named IDEAL_TEMPERATURE. But I need that his data won't get lost when the power supply is suddenly interrupted for some minutes or hours. Or when the watch dog timer (or any kind of reset) resets the MCU.
Which part of the reference manual should I look for this?
2018-05-15 01:51 PM
1. Detect a power loss. Power losses are often a process so brown out detection is a good starting point
2. Save data to non volatile memory once a power loss is detected.
In the rare event that sudden power loss is not detectable, write critical data to long-endurance non volatile memory.
2018-05-15 02:37 PM
Write it to EEPROM, FLASH or NVRAM (BATTERY BACKED) after the enter the value