AN987
APPLICATION NOTE
ST7 SERIAL TEST CONTROLLER PROGRAMMING
by Microcontroller Division Applications
INTRODUCTION
This application note describes:
– The advantages of Serial Test Controller Programming (STCP) vs. programming using an
EPROM programming board (EPB) (see Sec tion 2.1).
– How to implement Serial Test Controller Programming targeting most of the ST7 general pur-
pose microcontrollers (see Section 2.2). These devices include all parts supported by the
ST7 starter kits and ST7 EPBs in the MDT1, MDT2 and MDT4 tool families (see the supported device list in APPENDIX 1).
Note: In this applicatio n note, the term “programming tool” refers to either the EPBs or the
starter kits.
1 PROGRAM M ING TECHNIQU ES
There are two possible ways of programming an ST7 device:
■ Using a programming tool. In this case, the device is first plugged on the programming board
and then programmed. Then, the part is soldered or plugged into a socket on the user board.
This can be done using any of the following ST7 programming tools:
– ST7 Starter Kit
– ST7 EPB (EPROM Programming Board)
– ST7 Gang Programmer
For further details about the above tools, please refer to the user manual supplied with these
devices.
■ Using a Serial Test Controller Programming (STCP) tool. This technique allows a device to
be directly programmed on the user board. This is a two-step procedure where first the
board is first manufactured with a blank ST7, and afterwards the chip is programmed using
a programming tool (Starter Kit or EPB).
This application note describes the STCP method only.
AN987/1000 1/10
1
ST7 SERIAL TEST CON TR OLLER PROGR AMM IN G
2 SERIAL TEST CONTROLLER PROGRAMMING
2.1 ADVANTAGES
The advantages of STCP are numerous:
■ Time to market
To reduce manufacturing cycle times, a user board can be designed to be generic,
supporting several functions. These functions can be enabled or disabled by software
according to customer requirements. In this case, STCP allows application boards to be
manufactured in one shot and programmed w ith different functions according to customer
needs and orders.
■ Cost reduction
Software updates may be necessary in some cases because of a bug correction or a newly
implemented feature. The STCP is a flexible and painless way of performing such
modifications and at a lower cost. There is no need to add any sockets to the board or to
unsolder and change components in order to upgrade the application.
■ Security
Because STCP offers an easy w ay to custom ise the user’s program, or part of it, it can be
used to insert different key codes for each board. This could be used, for example, i n a door
lock sys te m.
■ Flexibility
For example, STCP can be used to allow calibration procedures to be performed directly in
the field.
2.2 USER BOARD S PECIFICATION
The user has to design his layout in order to support two modes: programming mode and user
mode.
Figure 1. shows the user board divided into two blocks:
■ Block 1:
Includes all the components that play a role during programming mode:
– Connector J1, which links the user board to the programming tool.
– The ST72 MCU, which is the device to be programmed.
– Jumpers W1 to Wn, whose purpose is to isolate the pins used for programming the ST72
from the other components in Block 2. In some application configurations, isolation resistors (47 kΩ) can be used instead of jumpers.
■ Block 2:
This block consists of all the other components soldered on the user board.
2/10
2
Figure 1. User Board
ST7 SERIAL TEST CONTROLLER PROGRAMMING
%ORFN %ORFN
-
67
:Q
:
Now, let’s define the pins used for pr ogrammin g the ST7. T hese pins a re put tog ether in the
W1 connector implemented in all the ST programming tool boards (see Section 3 APPENDIX
1 for the pin connector assignment).
All the ST7 programming tools referred to in this note (ST7 starter kits and ST7 EPBs in the
MDT1, MDT3 and MDT4 tool families) use a programming technique called JTAG (Joint Test
Action Group).
These programming tools control 11 pins:
■ 5 JTAG pins and 3 test mode pins, which are used for loading the software code into the
ST7. These pins are:
– Pin TCK: the test clock (input),
– Pin TMS: the Test Mode Select (input, weak pull-up),
– Pin TRST0: the Reset (Input, weak pull-up, active low)
– Pin TDI: the Test Data In (input, weak pull-up). This is the serial data input, sampled on
the rising edge of TCK.
– Pin TDO: the Test Data Out (tri-state output). This is the serial data output, updated on the
falling edge of TCK.
– Pins M0, M1 and M2: These 3 pins are used to force the test modes.
Depending on the d evice selected, t hese 8 pins will be as sociated with different p in num -
bers (see APPENDIX 1).
3/10