![GigaDevice Semiconductor GD32A50 Series Скачать руководство пользователя страница 64](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32a50-series/gd32a50-series_user-manual_2225782064.webp)
GD32A50x User Manual
64
5. The cache must be flushed before fast programming.
2.3.10.
Check blank command
The check blank command is used to check if the flash area which is specified by
FMC_ADDRx and CBCMDLEN bits in FMC_CTLx register are all 0xFF or not. Configure the
check blank command by setting the CBCMD bit in FMC_CTLx register and send the check
blank command to the FMC by setting the START bit in FMC_CTLx register, the BUSY bit
will be set, and the hardware will check if the flash area are all 0xFF or not. If the flash area
are all 0xFF, the ENDF will be set, and the BUSY bit will be cleared, or else the CBCMDERR
will be set. The check blank command only support for bank0 / bank1 / data flash.
Note:
The flash area to be checked must be in one page and should not exceed 1KB
boundary.
2.3.11.
OTP programming
The OTP programming opearation flow is as same as the main flash programming. The OTP
block can only be programed once and cannot be erased. The OTP area is only operated by
bank 1 registers (FMC_KEY1 / FMC_STAT1 / FMC_CTL1 / FMC_ADDR1).
Note:
It must ensure the OTP programming sequence completely without any unexpected
interrupt, such as system reset or power down. If unexpected interrupt occurs, there is very
little probability of corrupt the data stored in flash memory.
2.3.12.
Shared RAM
There are 4KB Shared RAM which can be used for basic SRAM, EEPROM SRAM or fast
program SRAM.
Basic SRAM
The basic SRAM command is sent by configuring the SRAMCMD bits as "10". After sending
the basic SRAM command, the Shared RAM initializes to all zeros.
If the basic SRAM is ready,
the BRAMRDY bit in FMC_WS register will be set and SRAMCMD will be cleared. Otherwise,
wait until the command has been finished. The basic SRAM can be used for system SRAM
but without ECC. The EEPROM can not be read or write when the Shared RAM is configured
as basic SRAM.
EEPROM SRAM
The EEPROM SRAM command is sent by configuring the SRAMCMD bits as "11". After
sending the EEPROM SRAM command, the Shared RAM initializes to all "1", and the data
will be loaded from EEPROM backup to the EEPROM SRAM and the BUSY bit in
FMC_STAT1 will be set.
If the EEPROM SRAM is ready, the ERAMRDY bit in FMC_WS
register and ENDF bit in FMC_STAT1 will be set, the BUSY bit in FMC_STAT1 and