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 Children
  • Have you looked at the VEE driver in the FSP, it has fault tolerance :-

  • What are the use cases for r_flash_lp and VEEprom on flash?

    In what scenarios do we use r_flash_lp and VEEprom on flash.

  • Hi Sudhanshu. VEE is simply an easy way to maintain data in data flash. You can't treat a data flash "variable" like a RAM variable. If you want to update data, you have to erase the entire data block first or write to a different location (and remember which is the more recent location). Then you also have to hope that the processor doesn't reset or lose power in the middle of an erase or write operation or you could end up with corrupted data. VEE writes all data to data flash in record format using an ID assigned by the user. So the user simply does VEE writes with a pointer to the data to write to flash along with its ID (e.g. ID_MY_SENSOR_VALUE), and then does a VEE read whenever the latest data needs to be accessed. If a reset or power loss occurs during an erase or write operation, VEE will detect corrupted data when it starts up next and account for it. The most data you could ever "lose" with VEE is one partially written record.