How often is data transferred from RAM to EEPROM ?

In a typical embedded automotive embedded system, I believe data is only transferred from RAM to EEPROM once every key cycle, right before embedded system goes to sleep ?
LVL 1
naseeamAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

peprCommented:
It depends. EEPROM stands for Electricaly Erasable Programmable Read-Only Memory. The first EEPROM were erased at once (whole content). Later, smaller regions of the memory could be erased. And the latest can even erase individual bytes. Meanwhile Flash ROM appeared -- it is similar in principle, but it is designed to erase bigger chunks of data. On the other hand, it is better in storing the data (capacity). Also Flash ROM is usually faster for reading and slower for erasing/writing. But "Flash ROM" was somehow different from what is understood as FLASH memory now. (The Flash ROM use the NOR flash technology is more reliable, faster for reading much slower for erasing). The FLASH (as in memory sticks; NAND flash technology) is also the type of EEPROM. It is much faster than older EEPROM, has bigger capacity, but data is accessed in large blocks, and is less reliable than Flash ROM.

Historically:

- ROM was manufactured with the content inside.
- PROM was programmable -- manufactured as blank, and programmable only once in the special device.
- EPROM is PROM that can be erased (Erasable PROM) using UV light (and then programmed again).
- EEPROM is Electrically Erasable PROM -- the acronym is rather old, but it is used for variously modern implementation of the principle.

This way, you should specify better what type of EEPROM you talk about ;)
naseeamAuthor Commented:
The EEPROM data is cached in RAM.  My question is typically how often is data transferred from RAM to EEPROM on every key cycle?
peprCommented:
When any value is cached, the write-back always depends on the cache politics. Writing back to EEPROM is always slower than reading, and much slower than writing to RAM. Also, the life time of EEPROM is defined in the number of writes.

This way, a good (software/hardware) application should avoid writing to EEPROM if it is not necessary. Only the "dirty" regions (changed values) from the cache (RAM) should be written back to EEPROM. Then it also depends on how often the region becomes dirty.

If the value depends on the user actions (like clicking the value on the car buttons -- say setting the time on the clock), there can be some delay when the change is considered "confirmed". The write-back should be done only on that confirmation.

If some continually changed sensor value should be written back to the EEPROM, then it should be postponed for some "reasonable" time. The "reasonable" may differ based on the purpose.

If loosing data collected in one-second interval is critical, then the write back should be done more frequently. If loosing the last ten-minutes information is not critical (say the calculation of the average fuel consumption), then writing back the information can be done less frequently.

To summarize, it depends on the software/hardware application. The maximum write-back frequency is limited by the EEPROM technical parameters, but it is not dictated by them.

Is it what you wanted to know? Did I uderstand the question well?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Automotive

From novice to tech pro — start learning today.