![](http://datasheet.mmic.net.cn/140000/ST7FLITE09Y0M1_datasheet_5015404/ST7FLITE09Y0M1_10.png)
ST7FLITE0
10/111
4 FLASH PROGRAM MEMORY
4.1 Introduction
The ST7 single voltage extended Flash (XFlash) is
a non-volatile memory that can be electrically
erased and programmed either on a byte-by-byte
basis or up to 32 bytes in parallel.
The XFlash devices can be programmed off-board
(plugged in a programming tool) or on-board using
In-Circuit Programming or In-Application Program-
ming.
The array matrix organisation allows each sector
to be erased and reprogrammed without affecting
other sectors.
4.2 Main Features
s
ICP (In-Circuit Programming)
s
IAP (In-Application Programming)
s
ICT (In-Circuit Testing) for downloading and
executing user application test patterns in RAM
s
Sector 0 size configurable by option byte
s
Read-out and write protection against piracy
4.3 PROGRAMMING MODES
The ST7 can be programmed in three different
ways:
– Insertion in a programming tool. In this mode,
FLASH sectors 0 and 1, option byte row and
data EEPROM
can be programmed or
erased.
– In-Circuit Programming. In this mode, FLASH
sectors 0 and 1, option byte row and data
EEPROM can be programmed or erased with-
out removing the device from the application
board.
– In-Application Programming. In this mode,
sector 1 and data EEPROM can be pro-
grammed or erased without removing the de-
vice from the application board and while the
application is running.
4.3.1 In-Circuit Programming (ICP)
ICP uses a protocol called ICC (In-Circuit Commu-
nication) which allows an ST7 plugged on a print-
ed circuit board (PCB) to communicate with an ex-
ternal programming device connected via cable.
This cable connected the ICC interface on the ap-
plication board to the programming tool see Figure
4.
ICP is performed in three steps:
Switch the ST7 to ICC mode (In-Circuit Communi-
cations). This is done by driving a specific signal
sequence on the ICCCLK/DATA pins while the
RESET pin is pulled low. When the ST7 enters
ICC mode, it fetches a specific RESET vector
which points to the ST7 system memory contain-
ing the ICC protocol routine. This routine enables
the ST7 to receive bytes from the ICC interface in
order to:
– Download ICP_Driver code in RAM from the IC-
CDATA pin
– Execute ICP_Driver code in RAM to program the
FLASH memory
Depending on the ICP_Driver code downloaded in
RAM, FLASH memory programming can be fully
customized (number of bytes to program, program
locations, or selection of the serial communication
interface for downloading).
4.3.2 In Application Programming (IAP)
This mode uses an IAP driver program previously
programmed in Sector 0 by the user (in ICP
mode).
This mode is fully controlled by user software. This
allows it to be adapted to the user application, (us-
er-defined strategy for entering programming
mode, choice of communications protocol used to
fetch the data to be stored etc.)
IAP mode can be used to program any memory ar-
eas except Sector 0, which is write/erase protect-
ed to allow recovery in case errors occur during
the programming operation.
4.3.3 Related Documentation
For more information, refer to the ST7 Flash Pro-
gramming Reference Manual and the ST7 ICC
Reference Manual.
4.4 Program Memory Read-out Protection
The read-out protection is enabled through an op-
tion bit (see section 15.1 on page 105).
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
and data EEPROM is first automatically erased.
Note: Both Program Memory and data EEPROM
are protected using the same option bit.
1