UM0225
User manual
Configuration and programming software (CAPS) tool
for STR9 families
Introduction
Configuration and Programming Software (CAPS) is the configuration software for the STR9 family
microcontroller. The CAPS configuration tool allows you to easily configure the STR9 using simple drag-
and-drop and point-and-click operations. CAPS also supports In-System-Programming through an
external JTAG adapter, allowing fast In-System-Programming of the STR9 in both development and
production environments.
This is the CAPS user manual, describing CAPS software functionality. When working with the CAPS
tool, you are also encouraged to download the datasheet associated with your particular device; the
datasheet may provide the only source of important configuration information needed for your design.
Getting started
gives an introduction to CAPS installation procedures and hardware requirements.
Although installation may seem trivial, it is highly recommended that you carefully follow the instructions
because many problems are often caused by incorrectly installing CAPS.
This is followed by
Introduction to the CAPS user interface,
which describes general CAPS usability and
the design process.
The
Designing with CAPS
section gives detailed information about each CAPS feature.
The appendices provide reference material useful for design and analysis.
O
so
b
te
le
r
P
uc
od
s)
t(
bs
-O
et
l
o
P
e
od
r
s)
t(
uc
August 2006
Rev 2
1/56
www.st.com
1
UM0169
1
Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.1
1.1.2
1.1.3
System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Installing CAPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Uninstalling CAPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2
1.3
1.4
Setting up the target hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
How to use this manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Recommended reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2
Introduction to the CAPS user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1
2.2
Project development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
The user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.1
2.2.2
2.2.3
2.2.4
The project menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
The tools menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
The view menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
The help menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3
Starting a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3.1
2.3.2
Creating a new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Opening an existing project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3
Designing with CAPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.1
Design flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.1.1
3.1.2
3.1.3
3.1.4
Manage
Project dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Design entry forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Additional settings form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Program device form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2
3.3
O
so
b
te
le
Specifying the LVD voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Specifying the clock source and frequency . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.3.1
3.3.2
3.3.3
Selecting the clock source and frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Specifying the clock divisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Saving the clock settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
r
P
uc
od
s)
t(
bs
-O
et
l
o
P
e
od
r
s)
t(
uc
3.4
3.5
3.6
Specifying peripheral and GPIO pin assignment . . . . . . . . . . . . . . . . . . . . . 24
View the GPIO pin assignment summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Configuring optional device parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.6.1
3.6.2
Setting security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Power-up boot flash selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
1/56
UM0169
3.6.3
3.6.4
3.6.5
3.6.6
Setting a JTAG/ISP user code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Setting sector protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Firmware placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Setting OTP programmable memory bytes . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.7
Validating and programming the target device . . . . . . . . . . . . . . . . . . . . . . . 33
3.7.1
3.7.2
3.7.3
3.7.4
3.7.5
JTAG-ISP operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Checksum the programming file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Generate ATE file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Target hardware verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Chaining multiple devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Appendix A Intel hex-32 record format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
A.1
A.2
A.3
A.4
Data record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
End record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Extended segment address record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Extended linear address record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Appendix B Project Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Appendix C HAL library C-header file example . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Appendix D FlashLINK Cable – Install fast JTAG driver . . . . . . . . . . . . . . . . . . . 52
D.1
D.2
Driver installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Workaround solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
O
so
b
te
le
r
P
uc
od
s)
t(
bs
-O
et
l
o
P
e
od
r
s)
t(
uc
2/56
1 Getting started
UM0225
1
Getting started
Before using CAPS, install the software on your PC. Connect your target device, if you plan to
program the device.
This section discusses the following topics needed to begin using the CAPS software.
•
•
•
•
CAPS software installation.
Setting up the target hardware.
The recommended approach to using this manual.
Complementary documentation considered to be useful when using the CAPS software.
1.1
Installation
This section describes the requirements and procedures needed to install the CAPS software.
1.1.1
System requirements
The CAPS PC configuration minimally requires:
•
–
–
–
–
–
•
•
Microsoft Windows XP
Windows 2000
Windows 98
Windows ME
Windows NT with Service Pack 6
PC with an Intel Pentium processor running a 32-bit Microsoft operating system:
32 MB RAM
25 MB hard disk space available
Note:
To use RLINK-ST, a USB port is required with a USB-supporting Windows operating system;
e.g., Win98SE, Win2000, Me and XP. (Note that Win95, Win98 First Edition and NT4.0 do NOT
support USB).
threading enabled systems. Refer to
Appendix D: FlashLINK Cable – Install fast JTAG driver,
for workaround options for both dual-processor and hyperthreading systems.
Caution:
FlashLINK Cable: JTD driver (OD) is NOT supported on dual-processor systems or hyper-
1.1.2
Installing CAPS
Follow these procedures and the on-screen instructions to install CAPS.
1.
2.
3.
Download the compressed CAPS software from the website.
Extract the contents of the
.zip
file into a temporary directory.
Double-click the extracted executable,
setup.exe,
to initiate the installation, and follow the
on-screen prompts to install CAPS in the development environment. This executable
installs all the necessary files and configures the PC environment for running CAPS. You
may be prompted to restart your PC before running CAPS for the first time following the
installation.
O
so
b
te
le
r
P
uc
od
s)
t(
bs
-O
et
l
o
P
e
od
r
s)
t(
uc
CAPS installation includes a number of utilities. Documentation for the utilities is located in the
subdirectory
\Docs
where CAPS is installed.
3/56
UM0225
Table 1.
CAPS utility programs
Description
Programming data file (.OBJ) editor.
Standalone JTAG/ISP programming utility.
Merge firmware utility.
1 Getting started
Utility Executable
ObjFileEditor.exe
uFLink.exe
uMerge.exe
uObjOsf.exe
Program data file conversion utility. Convert obj-to-osf and osf-to-obj files.
Subdirectory
Projects
is also created, and is the default location for storing your CAPS project
files. For example, if CAPS is installed in base directory
C:\CAPS,
the
Projects
directory is
located at
C:\CAPS\Projects.
1.1.3
Uninstalling CAPS
To uninstall CAPS, select
Start | Programs | STMicroelectronics - CAPS | Uninstall CAPS.
This removes all CAPS executable software and desktop references.
Note:
Any project files and environment files are preserved so they are available following a CAPS
software upgrade. However, it is a safe practice to backup your project files before uninstalling
and reinstalling the software.
1.2
Setting up the target hardware
If you are using CAPS features that interact with the target hardware, such as programming the
flash, configure and power the target hardware before starting a CAPS session. (Refer to the
the User Guide for your particular target hardware, found at http://www.st.com/mcu/).
Note: 1 When using FlashLINK, the 20-pin to 14-pin adapter (provided with the EVAL Kit or a customer
board) is required.
2 The device under test must be the same as the target device you select when you created your
project.
3 Follow the instructions below referring to the device-specific quick start guide or design guide
as needed.
1.
2.
Connect either the RLINK-ST USB cable or the FlashLINK parallel cable to your PC, and
connect the other end of the JTAG interface to the target board.
Configure jumpers according to the quick start or design guide documentation for the
target board.
Attach the power plug to the power jack of the target board.
Switch ON the target board.
O
so
b
3.
4.
te
le
r
P
uc
od
s)
t(
bs
-O
et
l
o
P
e
od
r
s)
t(
uc
4/56