![GigaDevice Semiconductor GD32A50 Series Скачать руководство пользователя страница 66](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32a50-series/gd32a50-series_user-manual_2225782066.webp)
GD32A50x User Manual
66
configured by EFALC. The larger the ratio of EEPROM backup and EEPROM SRAM makes
the better endurance.
The emulated EEPROM file system locates all valid EEPROM SRAM data records in
EEPROM backup and copies the newest data to Shared RAM. ERAMRDY bit in FMC_WS
register will be set after data from all valid EEPROM data records is copied to the Shared
RAM. After ERAMRDY bit is set, the Shared RAM is available for read or write access.
Setting the EPLOAD bit in option bytes 1, data will be loaded from EEPROM backup to the
Shared RAM after a system reset. Or when the SRAMCMD bits is configured as EEPROM
RAM mode, data will be loaded from EEPROM backup to the Shared RAM.
When reading the EEPROM, the data will be read from Shared RAM directly.
When writing the EEPROM, the data will be written in the Shared RAM and recorded in the
EEPROM backup. After a write to the RAM, the RAM is not accessible until BUSY bit is
cleared.
The read or write access can be byte, half-word or word.
Note:
If the EEPROM operation is interrupted by a power down, reset, ect, the contents in
EEPROM will not be guaranteed and leave in an indeterminate state. So appropriate
measures should be taken to avoid data loss by interrupt of EEPROM operation.
When the data flash is configured as EEPROM backup, one error is detected and
automatically corrected before copying data to the EEPROM SRAM. If two errors are detected
in EEPROM backup and the EEPROM SRAM need to load the data, the data reload to the
EEPROM SRAM will be all F.
Note:
1. It is strongly recommended not to perform system reset or power reset when writing
EEPROM.
2. When using the EEPROM, after the data in the EEPROM SRAM is loaded to the backup
EEPROM, the EPECCDET bit in FMC_ECCCS register must be checked. If the EPECCDET
bit is set, the data in EEPROM backup is not properly. And all the data in EEPROM backup
should be erased before using it again.
3. Between two system resets, the shared SRAM cannot be switched to EEPROM SRAM
twice. For example, it is not allowed to switch from EEPROM SRAM to basic SRAM or fast
programming SRAM, and then from basic SRAM or fast programming SRAM to EEPROM
SRAM. But it is possible to switch from basic SRAM or fast programming SRAM to EEPROM
SRAM, and then switch from EEPROM SRAM to basic SRAM or fast programming SRAM.
2.3.15.
Option bytes 0 erase
The FMC provides an erase function which is used to initialize the option bytes 0 block in
flash. The following steps show the erase sequence.