Retention of flash data for RA2E1

Hi

I am working on RA2E1. When I am storing any data to flash data memory, that data is getting retained but when I apply power cycle at a very fat rate i.e. within 1 second a power cycle is done then it is observed that the data gets erased.

Any suggestions to overcome this issue?

Regards

Sudhanshu

Parents Reply
  • Flash.zip

    I have attached the code snippet for my flash handling. 

    I maintain two copies of my data, at every power-up, I read the data and when any data needs to be modified I modify my data and write the same into my two data blocks.

    When the time between two power cycles is less than 1 second( approx) I lose my data, but with 5 seconds it works fine.

Children