![GigaDevice Semiconductor GD32E23 Series Скачать руководство пользователя страница 47](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794047.webp)
GD32E23x User Manual
47
When the operation is executed successfully, an interrupt will be triggered by FMC if the
ENDIE bit in the FMC_CTL register is set, and the ENDF in FMC_STAT register is set. Since
all flash data will be reset to a value of 0xFFFF FFFF, the mass erase operation can be
implemented using a program that runs in SRAM or by using the debugging tool to access
the FMC registers directly. The end of this operation is indicated by the ENDF bit in the
FMC_STAT register. (The starting address of programming operation should be 0x0800
Figure 2-2. Process of the mass erase operation
operation flow.
Figure 2-2. Process of the mass erase operation
Set the MER bit
Is the LK bit 0
Send the command to
FMC by setting
START bit
Start
Yes
No
Unlock the FMC_CTL
Is the BUSY bit 0
Yes
No
Is the BUSY bit 0
Yes
No
Finish
2.3.6.
Main flash programming
The FMC provides a 32-bit word/16-bit half word programming function by DBUS which is
used to modify the main flash memory contents. While actually, the data program to flash
memory is 32-bits or 64-bits which is defined by the PGW bit in the FMC_WS register.
The following steps show the register access sequence of the programming operation.