what happens if power loss during fram write?

Hello all,

First post so I hope I don't screw up. I am working on a project using arduino nano and an optical encoder. The plan is to count pulses on the encoder and every so often (few seconds) save the count to a fram module (adafruit I2C Fram Breakout with MB85RC256VPF FRAM chip). My question is: what happens if there is power loss during the writing process? Obviously the data would not be written but could it also corrupt the value already in the fram? I can live with loosing some pulses but if the data being overwritten could also be lost, then I would have to set up some kind of power failure routine to stop any writing. Thanks in advance for any comments.

I'd assume that it will be corrupt. The Adafruit FRAM only writes a byte at a time, so even if individual bytes don't get corrupted (no idea if this is true) a power failure half way through writing your data might leave you with an inconsistent state.

Makes perfect sense. Thank you for your time.