ST7262
17/134
FLASH PROGRAM MEMORY (Cont’d)
4.5 ICP (In-Circuit Programming)
To perform ICP the microcontroller must be
switched to ICC (In-Circuit Communication) mode
by an external controller or programming tool.
Depending on the ICP code downloaded in RAM,
Flash memory programming can be fully custom-
ized (number of bytes to program, program loca-
tions, or selection serial communication interface
for downloading).
When using an STMicroelectronics or third-party
programming tool that supports ICP and the spe-
cific microcontroller device, the user needs only to
implement the ICP hardware interface on the ap-
plication board (see Figure 2). For more details on
the pin locations, refer to the device pinout de-
scription.
ICP needs five signals to be connected to the pro-
gramming tool. These signals are:
– RESET: device reset
–VSS: device power supply ground
– ICCCLK: ICC output serial clock pin
– ICCDATA: ICC input serial data pin
–VPP: programming voltage
When the device is not yet configured to support
the application clock source (option byte not yet
programmed) or if the option bytes have to be pro-
grammed using ICP, one more pin has to be con-
nected:
– OSCIN: main clock input for external source
When the device is not supplied (VDD) by the ap-
plication, one more pin has to be connected:
–VDD: main power supply
CAUTIONS:
1. If RESET, ICCCLK or ICCDATA pins are used
for other purposes in the application, a serial resis-
tor has to be implemented to avoid a conflict in
case one of the other devices forces the signal lev-
el.
2. As soon as the external controller is plugged to
the board, even if an ICC session is not in
progress, the ICCCLK and ICCDATA pins are not
available for the application.
Note: To develop a custom programming tool, re-
fer to the ST7 Flash Programming and ICC Refer-
ence Manual which gives full details on the ICC
protocol hardware and software.
4.6 IAP (In-Application Programming)
This mode uses a BootLoader program previously
stored in Sector 0 by the user (in ICP mode or by
plugging the device in a programming tool).
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.). For example, it is
possible to download code from the SPI, SCI, USB
or CAN interface and program it in the Flash. IAP
mode can be used to program any of the Flash
sectors except Sector 0, which is write/erase pro-
tected to allow recovery in case errors occur dur-
ing the programming operation.
Figure 9. Typical ICP Interface
ICP PROGRAMMING TOOL CONNECTOR
10k
CL2
CL1
1
ICCDATA
ICCCLK
RESET
VSS
VDD
VPP
OSCIN
OSCOUT
ST7
HE10 CONNECTOR TYPE
APPLICATI ON
4.7k
TO
T
H
EA
PPL
IC
AT
ION
BOARD
1