
ST7265x
22/166
4 FLASH PROGRAM MEMORY
4.1 Introduction
The ST7 dual voltage High Density Flash
(HDFlash) is a non-volatile memory that can be
electrically erased as a single block or by individu-
al sectors and programmed on a Byte-by-Byte ba-
sis using an external VPP supply.
The HDFlash devices can be programmed and
erased off-board (plugged in a programming tool)
or on-board using ICP (In-Circuit Programming) or
IAP (In-Application Programming).
The array matrix organisation allows each sector
to be erased and reprogrammed without affecting
other sectors.
4.2 Main Features
s
Three Flash programming modes:
– Insertion in a programming tool. In this mode,
all sectors including option bytes can be pro-
grammed or erased.
– ICP (In-Circuit Programming). In this mode, all
sectors including option bytes can be pro-
grammed or erased without removing the de-
vice from the application board.
– IAP (In-Application Programming) In this
mode, all sectors except Sector 0, can be pro-
grammed or erased without removing the de-
vice from the application board and while the
application is running.
s
ICT (In-Circuit Testing) for downloading and
executing user application test patterns in RAM
s
Read-out protection against piracy
s
Register Access Security System (RASS) to
prevent accidental programming or erasing
4.3 Structure
The Flash memory is organised in sectors and can
be used for both code and data storage.
Depending on the overall Flash memory size in the
microcontroller device, there are up to three user
sectors (see Table 5). Each of these sectors can
be erased independently to avoid unnecessary
erasing of the whole Flash memory when only a
partial erasing is required.
The first two sectors have a fixed size of 4 Kbytes
(see Figure 12). They are mapped in the upper
part of the ST7 addressing space so the reset and
interrupt vectors are located in Sector 0 (F000h-
FFFFh).
Table 5. Sectors available in Flash devices
4.4 Program Memory Read-out Protection
The read-out protection is enabled through an op-
tion bit.
When this option is selected, the programs and
data stored in the program memory (Flash or
ROM) are protected against read-out piracy (in-
cluding a re-write protection). In Flash devices,
when this protection is removed by reprogram-
ming the Option Byte, the entire program memory
is first automatically erased and the device can be
reprogrammed.
Refer to the Option Byte description for more de-
tails.
Figure 12. Memory Map and Sector Address
Flash Memory Size
(bytes)
Available Sectors
4K
Sector 0
8K
Sectors 0,1
> 8K
Sectors 0,1, 2
4 Kbytes
2Kbytes
SECTOR 1
SECTOR 0
16 Kbytes
SECTOR 2
8K
16K
32K
60K
DV FLASH
FFFFh
EFFFh
DFFFh
3FFFh
7FFFh
1000h
24 Kbytes
MEMORY SIZE
8Kbytes
40 Kbytes 52 Kbytes
9FFFh
BFFFh
D7FFh
4K
10K
24K
48K
1