FLASH memory and EEPROM for vehicle development

FLASH memory

The so-called flash memory is one of the storage devices using semiconductor elements, which can be repeatedly written many times, and the stored content can be maintained even if the power is stopped. In recent years, storage elements as storage (external storage devices) products that permanently store data are rapidly spreading.

EEPROM

EEPROM is a non-volatile memory, even if the power is turned off, the recorded content will not disappear, and the content can be rewritten electrically.

Replace EEPROM with FLASH memory

Generally speaking, the number of times of rewriting of FLASH memory is less than that of EEPROM. In addition, since the erasing unit is a page (there are also blocks, sectors, etc.), it is a unit of words, even if it can be written, it cannot be erased. Therefore, it is not suitable for storing data that is frequently rewritten. However, the virtual address space is defined, and the actual memory space actually accessed corresponds to the plural number, and it can be used according to the appearance of the EEPROM. The conversion between virtual address space and actual memory space is done by software.

For example, the data to be saved is initially saved at the beginning of page 0. If you want to update this data, write it to another area of ​​page 0. To update the data further, write it to another area of ​​the same page. Data update will repeat this operation. At this time, the system designer must master the address of the actual memory space containing the latest data, and perform the conversion between the virtual address space and the actual memory space through software.

When page 0 is full, move the actual memory space to page 1, and clear page 0. By repeating this, it is obvious that the number of flash rewrites can be increased, and it can be accessed in units of words (Figure 1)
Insert picture description here

advantage

Compared with the external EEPROM that accesses data through communication, flash memory has a shorter data access time, so that data can be managed quickly, thereby improving data processing efficiency. In addition, there is no need for external EEPROM and its communication software, thereby reducing the number of parts and improving software efficiency.

Disadvantage

The use capacity of flash memory has increased. The increment depends on the amount of data actually stored and the number of updates. Generally speaking, the price of a microcomputer with a larger flash memory capacity is higher. Therefore, it is necessary to address the shortcomings of "increasing the price of microcomputers" and "reducing external components", "improving data processing efficiency", and "increasing software efficiency" Make a balance among the advantages.

At last

Since this method is managed by software, during data processing in the virtual address space, when a higher priority interrupt enters, it will be interrupted. When the CPU is reset, data processing is also interrupted. Therefore, considering the influence of interrupt processing and reset processing, appropriate processing is required.

Guess you like

Origin blog.csdn.net/qq_18191333/article/details/107411322