GD32F20x User Manual
48
register if erase bank1 only. Set MER bits in FMC_CTL0 register and FMC_CTL1 register
if erase entire flash.
Send the mass erase command to the FMC by setting the START bit in FMC_CTLx
registers.
Wait until all the operations have been finished by checking the value of the BUSY bit in
FMC_STATx registers.
Read and verify the flash memory by using a DBUS access if required.
When the operation is executed successfully, the ENDF in FMC_STATx registers is set, and
an interrupt will be triggered by FMC if the ENDIE bit in the FMC_CTLx registers is set. Since
all flash data will be modified 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 that accesses
the FMC registers directly.
For the GD32F20x_CL with flash size more than 512KB, the mass erase procedure applied
to bank1 is similar to the procedure applied to bank0.
Figure 2-2. Process of mass erase operation
operation flow.
Figure 2-2. Process of mass erase operation
Set the MER
bit(bits)
Is the LK bit is 0
Send the command
to FM C by setting
START bit
Start
Yes
No
Unlock the
FMC_CTL
Is the BUSY bit is 0
Yes
No
Is the BUSY bit is 0
Yes
No
Finish
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...