
Rev. 1.00
45 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)
Flash Memory Architecture
The Flash memory consists of up to 128 KB main Flash Block with 1 KB per page and 2 KB
Information Block for Boot Loader. The main Flash memory contains a total of 128 pages (or 64
pages for 64 KB device and so on) which can be erased individually. The following table shows the
base address, size, and protection setting bit of each page.
Table 5. Flash Memory and Option Byte
Block
Name
Address
Page
Protection Bit Size
Main Flash
Block
Page 0
0x0000_0000 ~ 0x0000_03FF
OB_PP [0]
1 KB
Page 1
0x0000_0400 ~ 0x0000_07FF
OB_PP [1]
1 KB
Page 2
0x0000_0800 ~ 0x0000_0BFF
OB_PP [2]
1 KB
Page 3
0x0000_0C00 ~ 0x0000_0FFF
OB_PP [3]
1 KB
:
:
:
:
:
:
:
:
Page 124
0x0001_F000 ~ 0x0001_F3FF
OB_PP [124]
1 KB
Page 125
0x0001_F400 ~ 0x0001_F7FF
OB_PP [125]
1 KB
Page 126
0x0001_F800 ~ 0x0001_FBFF
OB_PP [126]
1 KB
Page 127
(Option Byte)
Physical address: 0x0001_FC00 ~
0x0001_FFFF
Alias address: 0x1FF0_0000 ~
0x1FF0_03FF
OB_CP [1]
1 KB
Information Block Boot Loader 0x1F00_0000 ~ 0x1F00_07FF
NA
2 KB
Notes:
1. The Information Block stores the boot loader and this block cannot be programmed or
erased by users.
2. The Option Byte is always located at the last page of the Main Flash Block.
Wait State Setting
When the CPU clock, HCLK, is faster than the Flash memory access speed, the wait state cycles
must be inserted during CPU fetching instructions or loading data from the Flash memory. The
wait state can be changed by setting the WAIT [2:0] field of the Flash Pre-fetch Control Register,
CFCR. In order to meet the wait state requirement, the following two rules should be considered.
▆
The HCLK clock is switched from low to high frequency:
Change the wait state setting first and then switch the HCLK clock.
▆
The HCLK clock is switched from high to low frequency:
Switch the HCLK clock first and then change the wait state setting.
The following table shows the relationship between the wait state cycle and HCLK. The default
wait state is 0 since the High Speed Internal oscillator, HSI, which operates at a frequency of 8
MHz is selected as the HCLK clock source after a system reset.
Table 6. Relationship between Wait State Cycle and HCLK
Wait State Cycle
HCLK
0
0 MHz < HCLK ≤ 20 MHz
1
20 MHz < HCLK ≤ 40 MHz
2
40 MHz < HCLK ≤ 60 MHz