Flash Memory Architecture. Holtek HT32F5828

Add to My manuals
637 Pages

advertisement

Flash Memory Architecture. Holtek HT32F5828 | Manualzz

32-Bit Arm ®

HT32F5828

Cortex ® -M0+ MCU

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 4. Flash Memory and Option Byte

Block Name Address

Page 0

Page 1

Page 2

Page 3

0x0000_0000 ~ 0x0000_03FF

0x0000_0400 ~ 0x0000_07FF

0x0000_0800 ~ 0x0000_0BFF

0x0000_0C00 ~ 0x0000_0FFF

Main Flash

Block

:

:

Page 124

:

:

0x0001_F000 ~ 0x0001_F3FF

Page 125

Page 126

0x0001_F400 ~ 0x0001_F7FF

0x0001_F800 ~ 0x0001_FBFF

Page 127

(Option Byte)

Physical address:

0x0001_FC00 ~ 0x0001_FFFF

Alias address:

0x1FF0_0000 ~ 0x1FF0_03FF

Information Block Boot Loader 0x1F00_0000 ~ 0x1F00_07FF

Page

Protection Bit Size

OB_PP [0]

OB_PP [1]

OB_PP [2]

OB_PP [3]

:

:

OB_PP [124]

OB_PP [125]

OB_PP [126]

OB_CP [1]

1 KB

1 KB

1 KB

1 KB

:

:

1 KB

1 KB

1 KB

1 KB

NA 2 KB

Notes: 1. The Information Block stores the boot loader and this block can not 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 5. Relationship between Wait State Cycle and HCLK

Wait State Cycle

0

1

2

HCLK

0 MHz < HCLK ≤ 20 MHz

20 MHz < HCLK ≤ 40 MHz

40 MHz < HCLK ≤ 60 MHz

Rev. 1.00 45 of 637 December 28, 2020

advertisement

Related manuals

advertisement

Table of contents