Technology Sharing

Why do we need EEROM when there is FLASH in the microcontroller?

2024-07-08

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

Before I started, I happened to have some information. I carefully compiled a set of "MCU information from professional entry to advanced tutorials" based on the questions given by netizens.

Follow us, reply "888" in the comment area, and then reply "888" in the private message. All the information will be shared with everyone for free!!!

First, EEPROM is easy to operate. EEPROM writing is simple and does not require erasing before writing, while flash must be erased before writing. If you only want to replace a few bytes, you need to move the entire sector to another sector, erase the sector to be written, and then write the new content. Of course, there are file systems that will do this automatically, and you don’t need to erase every time you rewrite, but it is still very complicated compared to EEPROM.

Second, the lifespan of EEPROM is higher than that of flash. Generally, EEPROM has a lifespan of at least 100w times. For example, ST's EEPROM manual states that it has a nominal lifespan of 400w. I have done experiments and found that this kind of EEPROM can reach a lifespan of at least 2000w times. The nominal lifespan of flash is 100,000 times, and the lifespan experiments I have done are all around 40-50w times, which is much lower than that of EEPROM.

Third, EEPROM has low power consumption. If you need to protect data during power failure, the power of the electrolytic capacitor is enough for EEPROM. If you still need to read data from EEPROM during power failure and are sensitive to power consumption, EEPROM can meet your needs very well.

The main disadvantage of EEPROM is that it is expensive per unit capacity. Compared with flash, which is often priced in MB, EEPROM is generally priced in KB. It depends on the needs. If the data to be stored is not large and the power consumption is sensitive, then EEPROM is more suitable. Even if flash is needed, some important parameters can be placed in EEPROM. The reliability of EEPROM is still higher than that of flash.43e80b9163c47991fedfd90dda56899e.jpeg