GD32F20x User Manual
50
Figure 2-3. Process of word program operation
Set the PG bit
Is the LK bit is 0
Perform word/half
word write by DBUS
Start
Yes
No
Unlock the
FMC_CTL
Is the BUSY bit is 0
Yes
No
Is the BUSY bit is 0
Yes
No
Finish
For the GD32F20x_CL with flash more than 512KB, the program procedure applied to bank1
is similar to the procedure applied to bank0.
Note:
Reading the flash should be avoided when a program/erase operation is ongoing in the
same bank. And flash memory accesses failed if the CPU enters the power saving modes.
2.3.7.
Option bytes Erase
The FMC provides an erase function which is used to initialize the option bytes block in flash.
The following steps show the erase sequence.
Unlock the FMC_CTL0 register if necessary.
Check the BUSY bit in FMC_STAT0 register to confirm that no Flash memory operation
is in progress (BUSY equal to 0). Otherwise, wait until the operation has finished.
Unlock the option bytes operation bits in FMC_CTL0 register if necessary.
Wait until OBWEN bit is set in FMC_CTL0 register.
Set OBER bit in FMC_CTL0 register.
Send the option bytes erase command to the FMC by setting the START bit in
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 ...