Hello
If the situation is, Microcontroller --> SPI or I2C --> external NVRAM?
>> Microcontroller --> SPI or I2C --> external NVRAM?
Upon wakeup, software will read NVM data and calculate checksum. The calculated checksum will be compared with checksum stored in the NVM. If the checksums aren't identical, it means corrupted NVM data?
>> The microcontroller may erroneously perform a different/additional write access before the power down
If there is a bug in software, I can see this happening. Is there any other reason that would cause this to happen?
>> Or one of both at power up
On power up we don't write, we read first to find out if the in NVM is valid?
>> Power loss before NVRAM finished write process
Upon wakeup, software will read NVM data and calculate checksum. The calculated checksum will be compared with checksum stored in the NVM. If the checksums aren't identical, it means corrupted NVM data?
>> detect early power loss
What action to take if power loss is detected? If software tries to log power loss Diagnostic Trouble Code(DTC), it may not get logged because software an microcontroller may not operate during power loss. If software or hardware tries to force system reset, system reset may not occur because software and hardware may not be operational during power loss.
>> install proper RESET circuits to disable write access during low supply voltage (hardware)
Upon wakeup, software will read NVM data and calculate checksum. The calculated checksum will be compared with checksum stored in the NVM. If the checksums aren't identical, it means corrupted NVM data?
What if the situation is Data Flash internal to Microcontroller?