![GigaDevice Semiconductor GD32E23 Series User Manual Download Page 49](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794049.webp)
GD32E23x User Manual
49
-
The DBUS write is not alignment. If DBUS program is 32-bit and the PGW bit is set to
1(64-bit program to flash memory), the second DBUS write must double-word alignment
and belong to same double-word address. If DBUS program is 16-bit and the PGW bit is
set to 0(32-bit program to flash memory), the second DBUS write must word alignment
and belong to same word address. If DBUS program is 16-bit and the PGW bit is set to
1(64-bit program to flash memory), the 2
nd
/3
rd
/4
th
DBUS write must double-word
alignment and belong to same double-word address.
Note:
If the program is not write total 64bits/32bits (by setting the PGW bit in the FMC_WS
register), the data is not program to the flash memory without any notice.
In these conditions, a flash operation error interrupt will be triggered by the FMC if the ERRIE
bit in the FMC_CTL register is set. The software can check the PGERR bit, PGAERR bit or
WPERR bit in the FMC_STAT register to detect which condition occurred in the interrupt
Figure 2-3. Process of the word programming operation
programming operation flow.
Figure 2-3. Process of the word programming operation
Set the PG bit
Is the LK bit 0
Perform word/half
word write by DBUS
Start
Yes
No
Unlock the FMC_CTL
Is the BUSY bit 0
Yes
No
Is the BUSY bit 0
Yes
No
Finish
2.3.7.
OTP programming
The OTP programming method is same as the main flash programming. The OTP block can