SofTec Microsystems is always on the lookout for new ways to improve its Products and
Services. For this reason feedback, comments, suggestions or criticisms, however small,
are always welcome.
SofTec Microsystems reserves the right to make improvements to the PK Series of Starter Kits, their documentation and
software routines, without notice. Information in this manual is intended to be accurate and reliable. However, SofTec
Microsystems assumes no responsibility for its use; nor for any infringements of rights of third parties which may result
from its use.
SOFTEC MICROSYSTEMS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA, PROFITS,
USE OF PRODUCTS, OR INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY
THEREOF.
Trademarks
ST is a trademark of STMicroelectronics.
Microsoft and Windows are trademarks or registered trademarks of Microsoft Corporation.
PC is a registered trademark of International Business Machines Corporation.
Other products and company names listed are trademarks or trade names of their respective companies.
Written by Paolo Xausa
PK-ST7FLITE2 User's Manual
Contents
1. Overview 5
What is the PK-ST7FLITE2 Starter Kit? 5
ST7FLITE2 Built-In Debug Features 6
PK-ST7FLITE2 Board Layout 7
STVD7 Integrated Development Environment 8
Metrowerks and Cosmic Demo Versions 9
Recommended Reading 9
Software Upgrades 9
2. Getting Started 11
PK-ST7FLITE2 Components 11
Host System Requirements 11
Installing the Software 12
Installing the Hardware 12
Application Tutorial 13
Additional Examples 16
3. Hardware Features 17
Introduction 17
MCU Section 17
USB to ICC Interface 18
Demo Section 18
Prototype Area 19
4. Debugging Features 21
Limitations 21
Configuring the MCU 21
Hardware Model Settings 22
Device and Option Bytes Settings 25
Breakpoint Notes 25
Instruction Breakpoints and Advanced Breakpoints 26
Contents
Advanced Breakpoints Limitations 27
DataBlaze Programming Utility 28
5. Troubleshooting 31
Common Problems and Solutions 31
Communication can’t be established with PK-ST7FLITE2 31
A communication error is returned on a program execution command (Run,
Continue, Step, etc.) 32
The program execution stops at the beginning of user’s code 32
The program execution stops at an unexpected location 32
Getting Technical Support 33
Appendix A. Electrical and Physical Specifications 35
Appendix B. Clock Source Options 37
§ Clock source options include crystal/ceramic resonator, external clock or internal RC
oscillator;
§ Watchdog timer, two 8-bit Lite timers, one 12-bit auto-reload timer with four PWM
outputs;
§ Up to 15 multifunctional bi-directional I/O lines;
§ 7 high-sink outputs;
§ Integrated Debug Module (DM);
§ Input voltage range from 2.4 V to 5.5 V;
The PK-ST7FLITE2 Starter Kit has been designed for the evaluation of the ST7FLITE2
microcontroller and the debugging of small user applications.
The PK-ST7FLITE2 Starter Kit takes advantage of the STMicroelectronics Visual Debug
Integrated Development Environment (STVD7, which groups an Editor, Assembler and
Debugger), and the ST7FLITE2 built-in debug features, which allow the download and
debug of the user application into the microcontroller’s FLASH memory.
1
Page 5
1
1. Overview
The PK-ST7FLITE2 Starter Kit also includes the evaluation versions of the Metrowerks and
Cosmic C compilers for ST7, which seamlessly integrate with STVD7.
Together with STVD7, PK-ST7FLITE2 provides you with everything you need to write,
compile, download, in-circuit emulate and debug user code. Full-speed program execution
allows you to perform hardware and software testing in real time. PK-ST7FLITE2 is
connected to the host PC through a USB port. A prototyping area allows you to wire your
own small application.
PK-ST7FLITE2 offers you the following benefits:
§ Real-time code execution;
§ In-circuit debugging;
§ In-system programming and debugging through a ICC-compatible interface;
§ Demo area with push-buttons, potentiometer and user LEDs;
§ Prototyping area.
Note: the PK-ST7FLITE2 starter kit has been designed for evaluation purposes only. For
serious debugging, we suggest you to switch to the SofTec Microsystems inDART-STX
Series of debugging/programming tools.
ST7FLITE2 Built-In Debug Features
The ST7FLITE2 microcontroller features an ICC (In-Circuit Communication) serial interface
module which allows to communicate with a host device through two dedicated pins
(ICCDATA and ICCCLK). By means of ICC commands, a host device can program data
into/read data from the microcontroller, retrieve CPU register contents, and run the user
program.
Additionally, a dedicated peripheral (the Debug Module, or DM) is hard-wired in the device
and allows advanced debugging features like single-step execution and advanced
breakpoints.
All these features allow the implementation of low-cost, real-time emulation solutions, like
the PK-ST7FLITE2 Starter Kit. As a bonus, the PK-ST7FLITE2 Starter Kit features a USB-
Page 6
PK-ST7FLITE2 User's Manual
to-ICC circuitry which allows the host PC to communicate to the microcontroller through a
standard USB cable.
PK-ST7FLITE2 Board Layout
The PK-ST7FLITE2 board has the following hardware features:
1. A “USB to ICC Interface” section. It contains the circuitry needed to electrically and
logically translate ICC-like commands sent by the host PC through the USB cable to the
ICC interface of the microcontroller. The PK-ST7FLITE2 board is powered by the USB
bus.
2. A “Demo” section. It features a RESET push-button, one user push-button, a
potentiometer and eight user LEDs.
3. A “MCU” section. It contains a soldered, 20-pin ST7FLITE2 device (in SOIC package)
with connectors to access the I/O pins of the microcontroller for expansion prototyping.
4. A “Prototype” section. You can wire your own circuit here. The prototype section
features both a standard, thru-hole area (for mounting traditional components) and a
SMD area (for soldering SMD components in SOIC package).
1
Page 7
1
1. Overview
The PK-ST7FLITE2 Board
STVD7 Integrated Development Environment
The PK-ST7FLITE2 user interface is based on the ST7 Visual Debug Integrated
Development Environment (STVD7). STVD7 enables programs to be executed and stopped
where desired, while viewing the memory contents. It offers the ability to step through and
examine code at the C source level and the Assembly instruction level. You can introduce
breakpoints and run or single-step the executable, while viewing the source and observing
current program values. All registers and memory locations are accessible for both read and
write operations. This documentation covers the basic setup and operation of the STVD7,
but it does not cover all of its functions. For further information, please refer to the STVD7
on-line help.
Page 8
PK-ST7FLITE2 User's Manual
Metrowerks and Cosmic Demo Versions
Both of these third-party companies have developed a C compiler for use with ST7
microcontrollers. A demo version of each compiler is present on the SofTec Microsystems
PK-ST7FLITE2 “System Software” CD.
Recommended Reading
This documentation describes how to use PK-ST7FLITE2 together with the
STMicroelectronics STVD7 IDE. Additional information can be found in the following
documents:
§ AST7-LST7.PDF— This user’s guide describes how to use the STMicroelectronics
assembler, linker, formatter and librarian for the ST7 family.
§ ST7 FAMILY 8-BIT MCUs Programming Manual—Programming reference containing
the description of the full ST7 instruction set.
§ STMicroelectronics ST7 Datasheets.
Software Upgrades
The latest version of the PK-ST7FLITE2 system software is always available free of charge
from our website: http://www.softecmicro.com.
1
Page 9
2. Getting Started
PK-ST7FLITE2 User's Manual
PK-ST7FLITE2 Components
The PK-ST7FLITE2 package includes the following items:
1. The PK-ST7FLITE2 evaluation board;
2. A USB cable;
3. The SofTec Microsystems PK-ST7FLITE2 “System Software” CD-ROM;
4. A “QuickStart Tutorial” color poster;
5. This user’s manual.
Host System Requirements
The PK-ST7FLITE2 in-circuit debugger is controlled by an Integrated Development
Environment running under Windows (STVD7). The following hardware and software are
required to run the STVD7 user interface together with PK-ST7FLITE2:
1. A PC compatible system running Windows 98, Windows Me, Windows 2000 or
Windows XP;
2. 64 MB of available system RAM plus 40 MB of available hard disk space;
3. A USB port;
4. A CD-ROM drive (for installation).
2
Page 11
2
2. Getting Started
Installing the Software
Note: before connecting the PK-ST7FLITE2 board to the PC, it is recommended you first
install all of the required software (see below), so that the PK-ST7FLITE2 USB driver will be
automatically found by Windows when you connect the board.
The PK-ST7FLITE2 user interface setup program is located on the SofTec Microsystems
“System Software” CD-ROM provided with the instrument. The setup program will copy the
required files (including the USB driver) to your hard drive.
To install the PK-ST7FLITE2 user interface:
1. Insert the “System Software” CD-ROM into your computer’s CD-ROM drive.
2. A startup window should automatically appear (if the startup window doesn’t appear
automatically, manually run the Setup.exe file located on the CD-ROM root). Choose
“Install Instrument Software” from the main menu.
3. A list of available software should appear. Click on the “Install PK-ST7 Series” option.
4. Follow the on-screen instructions.
Note: if you are installing the PK-ST7FLITE2 system software on Windows 2000 or
Windows XP you must have logged in as Administrator.
Installing the Hardware
The PK-ST7FLITE2 board is connected through a USB port to a host PC. Connection steps
are listed below in the recommended flow order:
1. Install all the required system software as described in the previous section.
2. Insert one end of the USB cable into a free USB port.
Page 12
PK-ST7FLITE2 User's Manual
3. Insert the other end of the USB cable into the “USB” connector on the PK-ST7FLITE2
board. The green “POWER” LED on the instrument should turn on. Windows will
automatically recognize the instrument and will load the appropriate USB driver.
Note: both Windows 2000 and Windows XP may issue a warning the first time PKST7FLITE2 is connected to the PC. This warning is related to the fact that the USB driver
used by PK-ST7FLITE2 is not digitally signed by Microsoft, and Windows considers it to be
potentially malfunctioning or dangerous for the system. However, you can safely ignore the
warning, since every kind of compatibility/security test has been carried out by SofTec
Microsystems.
Application Tutorial
The sample application configures the A/D peripheral to convert on the A/D channel
connected to the potentiometer and displays the results on the LEDs.
1. Ensure that PK-ST7FLITE2 is connected to the PC (via the USB cable).
2. Make sure that all of the “LED ENABLE” jumpers, the “POTENTIOMETER ENABLE”
jumper and the “OSC_CLK” jumper are inserted.
3. Start the PK-ST7FLITE2 user interface by selecting Start > Programs > SofTec Microsystems > PK-ST7 Series > STVD7 for PK-ST7 Series. The first time you
launch the PK-ST7FLITE2 user interface you are prompted to enter the toolchain paths
to be used by STVD7’s integrated development environment. Click “Yes”. The following
dialog box will appear.
2
Page 13
2
2. Getting Started
The Toolchain Path Dialog Box
4. Click “OK”. The PK-ST7FLITE2 user interface will open.
5. From the main menu, choose File > Open Workspace. Select the “adc.wsp”
workspace file that is located under the “\Program Files\SofTec Microsystems\PK-ST7 Series\STVD7\Samples\PK-ST7FLITE2\Asm\Adc” directory. Click “Open”.
6. The application has already been assembled and the executable file generated. From
the main menu, choose Debug > Start Debugging. The user interface will display the
source code with the Program Counter pointing to the first instruction, alongside of the
Disassembly window.
Page 14
PK-ST7FLITE2 User's Manual
Debugging Session Started
7. From the main menu, select Debug > Run. The program will be executed in real-time.
By rotating the potentiometer on the demo board, you affect the results of the A/D
conversion, and the binary value of each conversion is displayed on the LEDs.
8. From the main menu, select Debug > Stop Program. The application will stop, and the
Program Counter arrow will point to the next instruction to be executed.
9. From the main menu, select View > ST7 Register. A small window displaying the
current value of all of the ST7 registers (Program Counter, Stack Pointer, Index
Registers, etc.) will appear.
2
Page 15
2
2. Getting Started
10. From the main menu, select View > Peripheral Registers. A small window displaying
the current status of all of the ST7 built-in peripherals (I/O ports, Timers, A/D converter
registers, etc.) will appear.
11. On the source code window, set a breakpoint on the “ ld A, ADCDRH” instruction. To do
so click on the line containing that instruction and then, from the main menu, select Edit > Insert/Remove Breakpoint. A solid, red circle will appear on the leftmost column
indicating that the breakpoint has been set.
12. From the main menu, select Debug > Run. The application will restart, and will
automatically stop at the previously set breakpoint.
13. From the main menu, select Debug > Step Into. This command will execute the “ld A,
ADCDRH” instruction. On the ST7 Registers window, you can see how that instruction
affected the value contained on the Accumulator. This value is the result of the A/D
conversion.
14. Issue three more Step Into command (Debug > Step Into). The Accumulator value will
be displayed on the LEDs.
Congratulations! You have successfully completed this tutorial! You can continue to
experiment with the PK-ST7FLITE2 user interface and discover by yourself its potentialities.
For an in-depth guide of all of the user interface features, select Help > Search from the
main menu.
Additional Examples
Additional examples can be found under the “\Program Files\SofTec Microsystems\PKST7 Series\STVD7\Samples\PK-ST7FLITE2\” directory. Compiling C examples requires
the presence of the Metrowerks or Cosmic C compiler.
Page 16
PK-ST7FLITE2 User's Manual
3. Hardware Features
Introduction
PK-ST7FLITE2 is an in-circuit debugger—it programs files into the ST7FLITE2
microcontroller and offers debugging features like real-time code execution, stepping, and
breakpoints. Its debugging features are achieved thanks to the microcontroller’s integrated
ICC (In-Circuit Communication) module and DM (Debug Module).
The ICC module communicates with the host PC board (via the “USB to ICC Interface”
circuitry) through two dedicated lines (ICCDATA and ICCCLK) of the microcontroller. The
same lines are also used during device programming.
Contrariwise to traditional in-circuit emulation (where the target application is executed and
emulated inside the emulator), PK-ST7FLITE2 uses the very same target microcontroller to
carry on in-circuit execution. This means that all microcontroller’s peripherals (timers, A/D
converters, I/O pins, etc.) are not reconstructed or simulated by an external device, but are
the very same target microcontroller’s peripherals. Moreover, the PK-ST7FLITE2 debugging
approach ensures that the target microcontroller’s electrical characteristics (pull-ups, lowvoltage operations, I/O thresholds, etc.) are 100% guaranteed.
MCU Section
The “MCU” section contains the ST7FLITE2 microcontroller. All of the microcontroller’s pins
are available on the two connectors placed on the sides of the microcontroller.
The “RESET” push-button in the “Demo” section is directly connected to the
microcontroller’s RESET pin.
The ICCDATA (PA5) pin and the ICCCLK (PA6) are driven (and reserved) by the “USB to
ICC Interface” circuitry.
The “OSC_CLK” jumper allows the microcontroller’s clock source to be selected. If the
“OSC_CLK” jumper is inserted, an 8-MHz clock signal is provided to the CLKIN (PB4) pin.
This clock signal is provided by the “USB to ICC Interface” circuitry, and allows an ICC
communication to be established (and therefore programming/debugging the device) even if
3
Page 17
3
3. Hardware Features
a wrong or non-existent clock source has been programmed into the microcontroller’s
Option Bytes. For more information, please read “Appendix B. Clock Source Options”.
USB to ICC Interface
This section contains the circuitry needed to electrically and logically translate ICC-like
commands sent by the host PC through the USB cable to the ICC interface of the
microcontroller.
The USB interface is based on a STMicroelectronics ST72F651 microcontroller, which
features an on-board, full-speed USB peripheral.
The USB bus provides the power supply for the board. To protect the USB bus against short
circuits that may occur during experiments, the power supply circuitry features a 200 mA
auto-restore fuse.
Demo Section
The “Demo” section groups push-buttons, a potentiometer, and user LEDs. In detail:
§ Eight user LEDs are connected to the microcontroller’s Port A and Port B pins. Eight
jumpers are also provided, to connect/disconnect the LEDs to/from the microcontroller’s
pins. By removing the jumpers, the pins of the microcontroller to which the LEDs were
connected become free for user applications.
§ One user push-button, connected to the microcontroller’s PA7 pin. In order to read the
status of this push-button, the microcontroller’s internal pull-up must be enabled
(through software) on this pin.
§ One push-button connected to the microcontroller’s RESET pin.
§ A potentiometer, together with a jumper to connect/disconnect it to/from the
microcontroller’s PB5 pin.
Page 18
PK-ST7FLITE2 User's Manual
Prototype Area
The prototype section features both a standard, thru-hole area (for mounting traditional
components) and a SMD area (for soldering SMD components in SOIC package).
3
Page 19
PK-ST7FLITE2 User's Manual
4. Debugging Features
Limitations
Some target on-chip resources are wasted for debugging purposes. In particular:
§ 5 stack levels (bytes) are wasted.
§ ICCDATA and ICCCLK lines are reserved for programming and in-circuit debugging.
§ The TRAP instruction and the TRAP interrupt vector are reserved for the on-chip debug
module. If you insert a TRAP instruction in your code, the program execution will stop
when the TRAP instruction is met, as if a breakpoint occurred.
§ The DM peripheral (the on-chip debug module) is reserved (DM registers must not be
written to by the user application; if read from, the data returned is undefined).
§ Peripherals run even in STOP mode.
§ The “WDG SW” bit in the Option Bytes must be set to “software watchdog”.
Configuring the MCU
Before to start a debugging session, you must define and configure the target device (MCU)
you wish PK-ST7FLITE2 to emulate. The target device is defined and configured from the
MCU Configuration dialog box. To access it, select Tools > MCU Configuration from the
main menu. The following dialog box will appear.
4
Page 21
4. Debugging Features
4
The MCU Configuration Dialog Box
Hardware Model Settings
First of all, verify that the hardware model corresponds to “PK-ST7FLITE2”. The
“Settings” button then allows you to set up detailed parameters used by PK-ST7FLITE2 to
perform its debugging activities.
All of the PK-ST7FLITE2 debugging and programming capabilities rely on the ICC (In-
Circuit Communication) mode of the target device. In order to enter this special mode
(which establishes a communication channel between the target device and PK-ST7FLITE2
through the ICCDATA and ICCCLK lines) and configure it properly, a few parameters must
be correctly specified.
By clicking the “Settings” button the following dialog box will appear:
Page 22
PK-ST7FLITE2 User's Manual
The Settings Dialog Box
The “ICC Mode Entry” parameter allows you to specify how PK-ST7FLITE2 will enter the
ICC mode. You can choose to use the Option Bytes programmed into the device or to
bypass them and use a “forced” value instead.
In the former case (“Use Option Bytes”), you must provide the required clock source
(specified in the Option Bytes value programmed into the device)—otherwise the device
won’t work.
In the latter case (“Ignore Option Bytes”, used by PK-ST7FLITE2 by default), the
microcontroller’s default Option Bytes value is used. This Option Bytes value specifies an
external clock source on the CLKIN pin: this external clock is automatically provided by the
“USB to ICC Interface” circuitry (if the “OSC_CLK” jumper is inserted). This mechanism
enables you to recover from a previous Option Bytes incorrect setting—it’s useful when the
Option Bytes value programmed into the device specifies incorrect start-up parameters,
since you can bypass them and start-up from a safe condition.
The following figure illustrates the role that the “ICC Mode Entry” parameter plays when
starting a debug session.
4
Page 23
4
4. Debugging Features
Page 24
Start Debugging Sequence
PK-ST7FLITE2 User's Manual
Device and Option Bytes Settings
The “Set Option Bytes” button allows you to access the Edit Option Bytes dialog box. The
following figure shows the Edit Option Bytes dialog box.
The Edit Option Bytes dialog box
Particular attention must be paid in correctly setting each of the Option Bytes parameters.
Improper settings may cause the target microcontroller not to work correctly (or not to work
at all).
4
Breakpoint Notes
PK-ST7FLITE2 can handle a maximum of two breakpoints within program memory.
Page 25
4
4. Debugging Features
Instruction Breakpoints and Advanced Breakpoints
Advanced breakpoints differ from instruction breakpoints (that is, standard breakpoints) in
that they can stop program execution depending on complex situations. Advanced
breakpoints allow you, for example, to stop execution when a specific value is written to a
specific address, or when two specified opcodes are fetched sequentially. To set advanced
breakpoints, choose Emulator > Advanced Break from the main menu (a debugging
session must have been started). The following dialog box will appear.
The Advanced Breakpoints Dialog Box
When using breakpoints (either instruction breakpoints or advanced breakpoints), be aware
of the following:
§ You can use advanced breakpoints or instruction breakpoints, but not a combination of
the two;
Page 26
PK-ST7FLITE2 User's Manual
§ As soon as a complex breakpoint is set, previously set instruction breakpoints are
automatically disabled—and vice versa;
§ Step commands (Step Into, Step Over, Step Out, Run to Cursor) waste one instruction
breakpoint. When issuing a step command, all previously set instruction or advanced
breakpoints are disabled, the step command is executed, and then previously set
instruction or advanced breakpoints are re-enabled.
Note: if an advanced breakpoint is set which specifies anything but an instruction fetch,
then program execution stops after the instruction during which the breakpoint condition is
met is executed.
Advanced Breakpoints Limitations
The Advanced Breakpoint dialog box allows you to configure breakpoints with a
large range of possibilities and combinations. However, some limitations apply.
§ Never set a breakpoint on data value/access with the data access type set to Read or
Read/Write, as an unexpected break may occur (the user application could be stopped
at a location different from the one specified in the breakpoint settings). All the different
types of breakpoint on data are concerned:
- Break on data value at a given address;
- Break on data access within address range;
- Break on data access outside of an address range;
- Break on data access at one of two addresses;
- Break on conditional stack write or data access at given address.
Workaround: use instruction breakpoints instead.
Note: setting a breakpoint on data value/access with the data access type set to Write
does not lead to any unexpected break.
Page 27
4
4
4. Debugging Features
§ Never set a breakpoint on data value/access within the stack area or just after the stack
area with the data access type set to Read or Read/Write, as an unexpected break may
occur (the user application could be stopped at a location different from the one
specified in the breakpoint settings). All the different types of breakpoint on data (as
above) are concerned.
Workaround: check any stack overflow, use the dedicated advanced breakpoints, break
on conditional stack write.
Note: setting a breakpoint on data value/access within the stack area or just after the
stack area with the data access type set to Write does not lead to any unexpected
break.
DataBlaze Programming Utility
A full-featured programming utility (DataBlaze) is also provided with the PK-ST7FLITE2
Starter Kit. To start the DataBlaze utility select Start > Program Files > SofTec Microsystems > PK-ST7 Series > DataBlaze Programmer.
This section reports some common problems that may arise during general use.
Communication can’t be established with PK-ST7FLITE2
1. Make sure the PK-ST7FLITE2 board is connected to the PC and powered (the
“POWER” LED must turn on). PK-ST7FLITE2 is powered by the USB connection.
If you have wired a power-hungry circuit in the prototype area, the total current required
by the PK-ST7FLITE2 board could exceed 200 mA, in which case the auto-restore fuse
cuts power to the board.
2. If you connected the PK-ST7FLITE2 board to the PC before installing the PKST7FLITE2 System Software, the PK-ST7FLITE2 USB driver may not have been
correctly installed on your system. Unplugging and re-plugging the USB cable is of no
use, since Windows has marked the device as “disabled”. As a consequence,
communication with the PK-ST7FLITE2 board will not be successful. To restore the
USB driver perform the following steps under Windows XP:
§ Plug the PK-ST7FLITE2 board to the PC.
§ Open the Control Panel (Start > Control Panel).
§ Open the “System” options.
§ Select the “Hardware” tab.
§ Click the “Device Manager” button.
§ The “PK-ST7 Series Starter Kit” device will be shown with an exclamation mark
next to it. Double click on this device.
§ In the “General” tab, click the “Reinstall Driver” button. Follow the on-screen
instructions.
5
Page 31
5
5. Troubleshooting
3. Make sure you are working with the correct hardware model. To view/change the
hardware model in use, choose Tools > MCU Configuration from the PK-ST7FLITE2
user interface’s main menu.
4. Make sure that the clock circuitry is working according to the Option Bytes
specifications. To view/change the Option Bytes, choose Tools > MCU Configuration
from the PK-ST7FLITE2 user interface’s main menu. From the dialog box which will
appear, click the “Set Option Bytes” button.
Remember that, even if the “ICC Mode Entry” parameter has been set to “Ignore Option Bytes”, the specified Option Bytes are ignored only during the download of the
program. After the download phase, the microcontroller is reset and the Option Bytes
specified in the Edit Option Bytes dialog box are used.
A communication error is returned on a program execution command (Run,
Continue, Step, etc.)
Make sure that the I/O bits corresponding to the ICCDATA and ICCCLK signals are set to
input mode by your program.
The program execution stops at the beginning of user’s code
A Reset condition occurred. This can be due to an external Reset condition
(microcontroller’s RESET line driven low) or an internal Reset condition (e.g., due to a
Watchdog event). For more information on causes that can trigger a Reset condition, please
refer to the specific ST7 microcontroller device data sheet.
The program execution stops at an unexpected location
Advanced breakpoints are enabled. When advanced breakpoints are enabled, instruction
breakpoints are disabled and the program execution stops as soon as an advanced
breakpoint condition is met. The stop location may appear to be “random”, but is actually
consistent with what specified in the Advanced Breakpoints dialog box. To view advanced
breakpoints active settings, choose Emulator > Advanced Break from the main menu.
Page 32
PK-ST7FLITE2 User's Manual
Getting Technical Support
Technical assistance is provided free to all customers. For technical assistance,
documentation and information about products and services, please refer to your local
SofTec Microsystems partner.
SofTec Microsystems offers its customers a free technical support service at
support@softecmicro.com. Before contacting us, we advise you to check you are working
with the latest version of the PK-ST7FLITE2 system software (upgrades are available free
of charge at http://www.softecmicro.com). Additional resources can be found on our ST7
online discussion forum.
5
Page 33
PK-ST7FLITE2 User's Manual
Appendix A. Electrical and Physical
Specifications
Operating Voltage 4.75 to 5.0 V DC (provided by the USB connection)
Power Consumption 200 mA (max)
Dimensions 137 x 86 x 15 mm
Weight 55 g
Operating Temperature 0 °C to 50 °C
Storage Temperature -20 °C to 70 °C
Humidity 90% (without condensation)
Electrical and Physical Specifications
Page 35
A
PK-ST7FLITE2 User's Manual
Appendix B. Clock Source Options
Overview
The ST7FLITE2 microcontroller can work with three different clock sources:
§ Internal RC oscillator (1 MHz);
§ External crystal/ceramic resonator;
§ External clock input.
Which clock source to use is specified by programming special bits in the Option Bytes (as
explained below).
Note: in order for the clock source specified in the Option Bytes to be used by the
microcontroller, the “ICC Mode Entry” parameter must be set to “Use Option Bytes”. If
set to “Ignore Option Bytes”, the 8-MHz clock signal provided by the PK-ST7FLITE2
board to the microcontroller’s CLKIN/PB4 pin will be used instead (if the “OSC_CLK” jumper
is inserted).
The “ICC Mode Entry” parameter is available, in STVD7, by selecting Tools > MCU Configuration and then clicking the “Settings” button.
Internal RC Oscillator
To use the 1-MHz internal oscillator, you must:
1. Tie the two oscillator pins (OSC1 and OSC2) to ground (on the PK-ST7FLITE2 board,
by default, OSC1 and OSC2 pins are not connected).
Page 37
B
Appendix B. Clock Source Options
2. Set the Option Bytes so that the RC oscillator is enabled (OSC bit).
3. Optionally, you may turn on the PLL multiplier (x4 or x8) to achieve a fCPU of 4 MHz or
8 MHz, respectively (PLLOFF and PLLx4x8 bits).
4. The internal oscillator must be calibrated to obtain the frequency required in the
application. This is done by software writing a calibration value in the RCCR (RC
Control Register). Whenever the microcontroller is reset, the RCCR returns to its default
value (FFh)—i.e., each time the device is reset, the calibration value must be loaded
into the RCCR. Predefined calibration values are stored in some FLASH and/or
EEPROM locations. If RC calibration is not used, these locations can be used as
“normal” memory. The RC Calibration Locations dialog box, available by clicking the
“RC Calibration Locations” button in the Settings di alog box allows you to specify, for
every RC calibration location available, whether to keep it reserved for calibration
purposes or to use it as a normal memory location.
B
The RC Calibration Locations Dialog Box
Page 38
PK-ST7FLITE2 User's Manual
External crystal/ceramic resonator
To use an external crystal/ceramic resonator:
1. The crystal or resonator must be connected to OSC1 and OSC2 pins as described in
the ST7FLITE2 datasheet.
2. Set the Option Bytes so that the RC oscillator is disabled (OSC bit).
3. Additionally, you must specify the crystal/resonator frequency range (OSCRANGE bits).
External Clock Input
Two methods for providing an external clock signals are available: one is to provide the
clock signal to the CLKIN/PB4 pin, and the other is to provide the clock signal to the OSC1
pin. The PK-ST7FLITE2 board is designed so that a 8-MHz clock signal is continuously
provided to the CLKIN/PB4 pin (if the “OSC_CLK” jumper is inserted). If you need a different
clock frequency, you can provide the required clock either to the OSC1 pin or to the
CLKIN/PB4 pin. In the first case:
1. Provide the clock signal to the OSC1 pin.
2. Tie the OSC2 pin to ground.
3. Set the Option Bytes so that the RC oscillator is disabled (OSC bit).
4. Additionally, you must specify the clock signal source—in this case, the OSC1 pin
(OSCRANGE bits).
In the second case:
1. Remove the “OSC_CLK” jumper.
2. Provide the clock signal to the CLKIN/PB4 pin.
3. Set the Option Bytes so that the RC oscillator is disabled (OSC bit).
4. Additionally, you must specify the clock signal source—in this case, the PB4 pin
(OSCRANGE bits).
B
Page 39
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.