
Rev. 1.00
47 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
4 Flash Memory Controller (FMC)
4 Flash Memory Controller (FMC)
Note that a correct address of the target page must be confirmed. The software may run out of
control if the target erase page is under the code fetching or data accessing status. The FMC will
not provide any notification when this happens. Additionally, the page erase operation will be
ignored on the protected pages. When this occurs, the OREF bit will be set by the FMC and then
a Flash Operation Error interrupt will be generated if the OREIEN bit in the OIER register is set.
The software can check the PPEF bit in the OISR register to detect this condition in the interrupt
handler. The following figure shows the page erase operation flow.
Is OPM equal to 0xE or 0x6 ?
Set TADR, OCMR
Commit command
by setting OPCR
Is OPM equal to 0xE ?
Finish
Start
Yes
No
Yes
No
Figure 10. Page Erase Operation Flowchart