![GigaDevice Semiconductor GD32A50 Series Скачать руководство пользователя страница 59](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32a50-series/gd32a50-series_user-manual_2225782059.webp)
GD32A50x User Manual
59
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. accesses the FMC registers directly. Additionally, the mass erase
operation will be ignored if any page is erase / program protected. In this condition, a flash
operation error interrupt will be triggered by the FMC if the ERRIE bit in the FMC_CTLx
register is set. The software can check the WPERR bit in the FMC_STATx register to detect
this condition in the interrupt handler. The
Figure 2-2. Process of mass erase operation
indicates the mass erase operation flow.
Figure 2-2. Process of 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_CTLx
Is the BUSY bit 0
Yes
No
Is the BUSY bit 0
Yes
No
Finish
Note:
The mass erase of bank 1 is split to 128 page erase by hardware, so the mass erase
time is longer than bank 0.
2.3.8.
Main flash programming
The FMC provides a 32-bit word programming function by DBUS which is used to modify the
main flash memory contents. While actually, the data program to flash memory is 64-bits.The