Question about reading and writing Flash of EMX?

There is a 4.5MB FLASH in EMX.

I want to store some values in Flash once every 10 seconds in Flash, so that the values will be not left if power off. These values will be read from flash again when power on.

I have read some posts in the forum, it seems that I need the "Extended Weak Reference"
or “Battery RAM”. and a battery(3.3V) for “RTC_VBAT” Pin.

Question 1: why a battery(3.3) is needed? Flash is an electronic non-volatile storage, why I need a battery to keep the data in the Flash?

Question 2: After builing the Visual Studio project and clicking “F5”, the project will be loaded to EMX, which file of Visual Studio is be loaded in EMX? where is the file be save in EMX?

The flash is for your applications. Concentrate on learning about Extended Weak Reference.

Or you can also use:

-SD card module
-external flash module.

1.) Battery RAM is not FLASH it lose data when lose power.
2.) You can see some dll and exe files on your output debug/build folder, but I think they are converted before flashed to EMX.

There is a finite write lifetime count for flash memory. It is normally not a concern when deploying programs, but every ten seconds might be a problem.

Yes I would suspect you don’t want to use EWR for storage of data samples. It’s intended for system parameter information that changes infrequently. I certainly would be looking at a separate SD storage solution or even a flash module with @ Taylorza’s file system on it as a better solution.

Thank you for your answer, I have thought about the SD Card. The “finite write lifetime” is a very important problem. I will use separate SD storage but I give up “saving data to SD card every ten seconds”.

Thank you again for the help from all of you!!