ST AN1526 Application note

AN1526
APPLICATION NOTE
ST7FLITE0 QUICK REFERENCE NOTE
by Microcontroller Division Applications

INTRODUCTION

The ST7FLITE0 extends the lower end of the ST7 range, designed to fit applications with state-of-the-art features in a very small package.
This application note highlights some small but very important aspects of the ST7FLITE0 that users should not overlook when reading the datasheet.
Sections 2 and 3 contain helpful pointers and a table to help you star t working with ST7FLITE0 and its related tools.
Table 1. ST7Lite0 Features
Program memory RAM
Data EEPROM Package
Number of I/O pi ns Vdd ra nge Temperature range IDDmax in RUN mode LVD
Clock sources
A/D
Timers Communication peripheral Special features
1.5
Kbytes Flash (single voltage)
128 bytes ST7FLITE05: no Data EEPROM
ST7FLITE09: 128 bytes Data EEPROM SO16 (.150) or DIP16 13 (including 6 high current pins)
2.4V - 5.5V
-40°C to +85°C 5mA 3 levels (Standard) Internal RC (1MHz) +/- 1%
PLLx4 (2.4V<V PLLx8 (3.3V<V
8 bits with fixed gain - Op-Amp 5 channels
Autoreload Timer: 1 12-bit PWM channel, Output Compare function Lite Timer: Watchdog, Real Time Clock, Input Capture functions
SPI Read-out protection, In-Circuit Programmming (ICP), In Application Programming
(IAP)
<3.3V)
dd
<5.5V)
dd
AN1526/0503 1/26
1
Table of Contents
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 ST7FLITE0 KEY A DVANTAGES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 LOW-COST 8-BIT MICROCONTROLLER SOLUTION . . . . . . . . . . . . . . . . . . . . 3
1.2 AREA OP TIMIZATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 HIGH ACCURACY INTERNAL 1MHZ RC OSCILLATOR . . . . . . . . . . . . . . . . . . 4
1.4 8-BIT A/D CONVERTER WITH INPUT VOLTAGE AM PLIFIER (X8) . . . . . . . . . 4
1.5 TRUE E2PROM DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.6 SAFE PROTECTION AGAINST PIRACY ON DATA E2PROM AND FLASH . . . 5
1.7 IN-C I RCUIT P RO GRAMMI NG AND IN-APPLICATIO N PROG RAMMING CAPABILI­TIES 6
2 ST7LITE0 DEVELOPMENT TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1 SOFTWAR E TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.1 ST7 Visual Debug IDE - Reference: STVD7 . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.2 STVD7 Simu lator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.3 C Compiler toolchains from Cosmic and Metrowerks . . . . . . . . . . . . . . . . . 7
2.1.4 ST7 Visual Programmer - Reference: STVP7 . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 HARDWARE TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.1 In-Circuit Debugging Kit - Reference: ST7FLITE 0-IND ART . . . . . . . . . . . . 8
2.2.2 ST Emulator - Reference: ST7MDT10-EMU3 . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.3 ST Programming tool - Refer ence: ST7MDT10-EPB . . . . . . . . . . . . . . . . . 9
2.2.4 ST Graphic Design and Debug - Reference: STREALIZER-II . . . . . . . . . . . 9
3 START TODAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4 ST7FLITE0 8-BIT MCU - EASY REFERENCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2/26
1
26
ST7FLITE0 QUICK REFERENCE NOTE

1 ST7FLITE0 KEY AD VAN T AG ES

1.1 LOW-COST 8-BIT MICROCONTROLLER SOLUTION

The ST7FLITE0 is a small low-cost microcontroller, embedding many analog functions. It therefore allows you to save board area and the cost of external components. There is no need for:
- external ceramic resonator for accurate oscillators (see 3.2)
2
- external E
- external reset circ uitry
- external LVD circuitry
- PCB rework for SW update
- large PCB

1.2 AREA OPTIMIZATION

data (see 3.4)
ST7FLITE0 gives you the choice of two small 16-p in packa ges. Yo u can take adva ntage of this to save area on your PCB.
SO16: 6x9.9mm DIP16:10.92x19.18mm
ST7FLITE0 actual-size footprint of 16-Pin SO Package - Typical: 6mm wide, 9.9mm long
3/26
ST7FLITE0 QUICK REFERENCE NOTE

1.3 HIGH ACCURACY INTERNAL 1MHZ RC OSCILLATOR

The ST7Fl ite0 con tains a n i nter nal RC osc illator with a n a ccur acy of 1% for a give n d evice, temperature and voltage. It must be calibrated to obtain the frequency required in the applica­tion. This is done by software writing a calibration value in the RCCR (RC Control Register).
Whenever the ST7FLITE0 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 in the RCCR.
2
Predefined calibration values are stored in E
PROM for 3.0 and 5V VDD suppl y voltages at
25°C, as shown in the following table.
RCCR Conditions
V
=5V
DD
=25°C
T
RCCR0
RCCR1
A
fRC =1MHz
V
=3V
DD
T
=25°C
A
fRC =700kHz
ST7FLITE09
Address
1000h and
FFDEh
1001h and
FFDFh
ST7FLITE05
Address
FFDEh
FFDFh
If the voltage or temperature conditions change in the application, the frequency may need to be recalibrated.
Refer to AN1324 “Calibrating The RC Oscillator of the ST7FLITE0 MCU using the Mains
for information on how to calibrate the RC frequency using an external reference signal.
Decoupling capacitor f or stab le oscillator
Vdd and Gnd levels impact the stability of the 1% internal RC of the ST7FLITE0. To reach the most stable oscillation, use decoupling capacitors between Vdd and Gnd pins, at values rec­ommended in the datasheet.
RCCR calibration locations can be W rite Protected The STVP or InDART tools allow you to prevent uni ntentional write acc ess to the RCCR cali-
bration locations.

1.4 8-BIT A/D CONVERTER WITH INPUT VOLTAGE AMPLIFIER (X8)

The 8-bit A/D converter allows up to 5 channels with multiplexed inputs. You can take advantage of its internal fixed-gain amplifier (x8) for zooming on low voltage in-
puts. For Vd d=5V , the AD C can the refore c onver t from 0V to 250mV . In this case the ADC ideal resolution is 2.4mV, equivalent to a 11-bit resolution with input range from 0V to Vdd.
4/26
ST7FLITE0 QUICK REFERENCE NOTE

1.5 TRUE E2PROM DATA

The ST7FLITE09 contains an Electrically Erasable Programmable Read-Only Memory which can be used as a non volatile back-up for storing data. It allows up to 300K Write/Erase cycles at 25°C.
Main Features
- Up to 32 Bytes programmed in the same cycle
- mono-voltage EEPROM (charge pump)
- Chained erase and programming cycles
- Internal control of the global programming cycle duration
- WAIT mode management
- Read-out protection against piracy
Useful Tips: ST7FLITE05: Emulate Data E2PROM wit h p rogram area
For devices with no Data E2PROM, you can emulate Data EEPR OM with the XFlash Memory. For more information, refer to: AN1477: Emulated Data EEP ROM with XFlash memory

1.6 SAFE PROTECTION AGAINST PIRACY ON DATA E2PROM AND FLASH

2
Data stored in the E
PROM memory, as well as the pr ogram memo ry, are protected against read-out piracy. This is managed by the option bit “Read-out protection”. Removing this option by erasing the option byte will cause the whole memory to be erased first.
Flash program mem ory can also be protected aga inst re-w rite opera tion by opti on bit “Flash Write protection”. When this option is selected, the program memory can never be erased or programmed again.
5/26
ST7FLITE0 QUICK REFERENCE NOTE

1.7 IN-C IRCUI T PROGR AMMING AN D IN- APPLICAT ION P ROGRAMMING CAPABI LITIES

In addition to using a programming tool, the two follow ing modes allow you to program your ST7LITE0 without removing it from your PCB.
ICP: In-Circuit-Programming: The ICP is the ability to program the Flash memory (FLASH sec­tors 0 and 1, option byte row and data EEPROM) of a microcontroller using ICC (In-Circuit Communication) protocol while the device is already plugged-in to the application, but appli­cation is not running.
IAP: In-Application-Pro gramm ing: The IAP is the ability to re-progra m the FLAS H memor y (FLASH sector 1 and data EEPROM) of a microcontroller while the device is al ready pl ugged­in to the application and the application is running. As sector 0 contains the software driver to be able to re-program, it is write protected, therefore not reprogrammable.
In ICP minimum configuration, only 3 wires are needed (ICCCLK, ICCDATA, RESET user may also use it as a basis to develop its own debugging tool.
Programm ing time:
ICP allows 1kbytes to be programmed/erased in 160ms. Typical measurements: 1.5k Flash programming time: 315ms For more information, refer to the Programming Manuals: . ST7 Flash Programming Reference Manual . ST7 ICC Protocol Reference Manual
Useful Tips: Sector 0 size configurable by Option Byte
As sector 0 is not re-programmable in IAP programming mode, you may take advantage of configuring its size to optimize Program Memory. By Option Byte, sector 0 size can be set at 0.5 Kbytes, 1 Kbytes, or 1.5 Kbytes.
). The
6/26
ST7FLITE0 QUICK REFERENCE NOTE

2 ST7LITE0 DEVEL OPMENT TOOLS

Table 2 shows a summary of available tools for each function.
Table 2. Available Tools
DEBUG
SIMULATE EMULATE
&
PROGRAM
STVD7 Simulator
SOFTWARE
no need ST7MDT10-EMU3 ST7FLITE0-INDART no need ST7MDT10-EPB
HARDWARE
STVD7 STVD7 (included in
ST7FLITE0-INDART package)
GRAPHIC
DESIGN &
PROGRAM
DEBUG
ST-REALIZERII STVP7
Note: Third-party C-compiler tool chains can be used with STVD7 interface.

2.1 SOFTWARE TOOLS

2.1.1 ST7 Visual Debug IDE - Reference: STVD7

Visual interface for C or Assembler coding, compile, download and debug with ST7 Emulators or ST7FLITE0-INDART.
Web: http://mcu.st.com
ST7

2.1.2 STVD7 Simulator

Stand-alone tool whi ch al lows to wr ite code, c ompi le, and simul ate an ST 7FLITE0 w ith your PC your ST7FLITE0.
Web: http://mcu.st.com
ST7

2.1.3 C Compiler toolchains from Cosmic and M etrowerks

- Free evaluation version limited to 1K
- Low-cost lite C compiler limited to 8K This compilers can be embedded in STVD7 IDE interface, or used through dedicated graph-
ical interfaces. Web: Cosmic Software Inc.: www.cosmic-software.com Metrowerks: www.metrowerks.com

2.1.4 ST7 Visual Programmer - Reference: STV P7

2
Visual Interface allowing to program Flash, Data E
PROM, and option bytes. This i s the soft-
ware part of the whole programming tool package. See 4.2.3 for more details.
7/26
ST7FLITE0 QUICK REFERENCE NOTE

2.2 HARDWARE TOOLS

2.2.1 In-Circuit Debugging Kit - Reference: ST7FLITE0-INDART

ST7FLITE0-INDART includes a full-featured experiment board, an in-circuit programming utility, and all tools required to develop custom embedded applications, at low cost. 100% of electrical characteristics are guaranteed by use of a standard chip, not bondout chip.
ST7FLITE0-INDART contains STVD7 graphical interface, C compiler and assembl er. Debugging capabilit ies: Real-time emulation, breakpoints, step capabilities , read/write
memory and registers.
2
Programming capabilities: Blank-check, Program, Read, Verify Flash, E
PROM memory and
Option Bytes.
Notes:
1. It can be ordered from ST, or directly from Softec. Softec reference: inDART-ST7FLITE0
2. No power supply is delivered with this kit. A typical 5V may be used. Web: http://www.softecmicro.com/indart-st7flite0.html e-mail: info@softecmicro.com

2.2.2 ST Emulator - Reference: ST7MDT10-EMU3

Advanced development tool including:
- Real-time emulator (Advanced breakpoints management (through Bus Event Machine), 256K real-time trace recording, read/write on the fly through Watch and Memory windows, Performance analysis)
- STVD7 User Interface
- Set of probes for Lite family packages.
- Parallel interface cable to PC
- Power Supply Note: the ST Emulator cannot program parts. Therefore, a separate devic e programmer is r e-
quired (as ST7 Programming tool (see 4.2.3))
Web: http://mcu.st.com
ST7
8/26
Loading...
+ 18 hidden pages