AN1752
APPLICATION NOTE
ST72324 QUICK REFERENCE NOTE
by Microcontroller Division Applications
INTRODUCTION
The purpose of this document is to give you a basic understanding of the ST72324 and to help
you quickly get started with developing your application.
It also highlights important aspects of the ST72324 that you should not overlook when reading
the datasheet.
Section 1 gives an overview of the key benefits of the device.
Sections 2 and 3 contain helpful pointers to help you choose the right tool for the development
environment and start working with ST72324.
In each section of this application note, you will find many useful technical tips to help you
make the most of the ST72324 features in your design.
Rev. 1.1
AN1752/1103
1/14
1
Table of Contents
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 OVERVIEW OF DEVICE FEATURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 ST72324 KEY BENEFITS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1 8-BIT SOLUTION FOR MID-RANGE APPLICATIONS . . . . . . . . . . . . . . . . . . . . 4
2.2 ENHANCED CLOCK MANAGEMENT MODULE . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 INTEGRATED FEATURES FOR MORE RELIABILITY . . . . . . . . . . . . . . . . . . . . 5
2.4 NESTED INTERRUPTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.5 POWERFUL INDUSTRY STANDARD COMMUNICATION INTERFACES . . . . 6
2.6 IN-CIRCUIT PROGRAMMING AND IN-APPLICATION PROGRAMMING . . . . . 6
3 ST72324 DEVELOPMENT TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1 CODE DEVELOPMENT TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.1 ST7 Assembler and Linker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.2 C Compiler toolchains from Cosmic and Metrowerks . . . . . . . . . . . . . . . . . 9
3.1.3 ST7 Software Library: ST7LIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 DEBUGGING TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.1 ST7 Visual Debug IDE: STVD7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.2 ST7 Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.3 Emulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3 PROGRAMMING TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3.1 ST7 Visual Programmer: STVP7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3.2 ST7 Programming Board: ST7MDT20J-EPB /EU/US/UK . . . . . . . . . . . . . 11
3.3.3 ST7-STICK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3.4 ST7 Flash Programmer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4 E-SUPPORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
14
2/14
1
ST72324 QUICK REFERENCE NOTE
1 OVERVIEW OF DEVICE FEATURES
ST72324 family extends the ST7 mid-range for appliance, industrial and automotive applica-
tions, requiring medium and large memory capacities and up to 32 I/O ports. The device has
software LIN compatibility and supports extended temperature range (-40°C to +125°C),
which are key features for supporting automotive applications.
Table 1. Device features
Program Memory
RAM
Package
8 to 32k dual voltage Flash or ROM with Read-out protection capability
384 to 1K bytes
SDIP42, TQFP44 10x10,SDIP32, TQFP32 7x7
Up to 32 I/O ports
Number of I/O ports
– 32/24 multi functional bidirectional I/O lines
– 22/17 alternate function lines
– 12/10 high sink outputs
– External Clock Source
– 4 Crystal/Ceramic Oscillator types
– Internal High Frequency RC Oscillator
Clock Source
Power Saving Modes
Interrupt Management
Operating Voltage
Temperature Range
A/D
Halt, Active-Halt, Wait and Slow
– Nested interrupt controller
– 10 interrupt vectors plus TRAP and RESET
– 9/6 external interrupt lines (on 4 vectors)
3.8V to 5.5V
-40°C to +125°C
10-bit A/D with up to 12 input pins
– Main Clock Controller with: Real time base, Beep and Clock-out ca-
pabilities
Timers
– Configurable watchdog timer
– Two 16-bit timers with input capture, output compare and PWM
modes
Communication Peripherals
– SPI synchronous serial interface
– SCI asynchronous serial interface (LIN compatible)
– 8-bit Data Manipulation
– 63 Basic Instructions
– 17 main Addressing Modes
– 8 x 8 Unsigned Multiply Instruction
In-Application Programming and In-Circuit Programming
Instruction Set
Special Features
3/14
ST72324 QUICK REFERENCE NOTE
2 ST72324 KEY BENEFITS
2.1 8-BIT SOLUTION FOR MID-RANGE APPLICATIONS
The device offers the following state-of-the-art benefits:
s
Reduced board size, as most components are integrated in the device. There is no need for
a separate RESET generator, low voltage detection circuitry (LVD) or auxiliary voltage
detection (AVD) for early warning of power failures.
Availability in a range of pin-compatible devices from 8K to 32K of ROM or Flash program
memory. Hence, there is no need to re-design the board if the application code size
increases.
Up to 32 I/O ports and a 10-bit A/D converter with up to 12 input channels reduce the
integration effort and board size.
True open drain I/O pins for applications requiring high current, e.g. for driving relays
through I/Os.
17 addressing modes are supported, resulting in more compact code.
Flash with Read-out protection against piracy and also Register Access Security System
(RASS) to prevent accidental programming/erasing.
s
s
s
s
s
Useful Tips:
Emulate Data E
2
PROM with program area
To store non-volatile parameters (such as user preferences and
calibration constants), you can emulate Data EEPROM with the
HDFlash Memory.
For more information, refer to:
AN1502: Emulated Data EEPROM with ST7 HDFlash memory
2.2 ENHANCED CLOCK MANAGEMENT MODULE
This module allows you to select different main clock sources:
s
s
s
An external source
4 crystal or ceramic resonator oscillator types
An internal high frequency oscillator
Each oscillator is optimized for a given frequency in terms of consumption. This can be se-
lected through the option byte.
s
Along with the above mentioned options for selection of clock source, the clock
management also supports a
Main Clock Out option
which can be used to drive external
4/14
ST72324 QUICK REFERENCE NOTE
devices on your application board and a
Beep Out option
which generates 3 selectable
frequencies at a 50% duty cycle.
Useful Tips:
Calibrating Peripheral Parameters for Internal RC Oscillator
Peripherals like the Timer, SCI etc. which depend upon time
calculation, can be calibrated by determining the Internal RC accuracy
error.
For more information, refer to:
AN1530: Accurate Timebase for low cost ST7 applications with Internal
RC oscillator
2.3 INTEGRATED FEATURES FOR MORE RELIABILITY
The system integrity module consists of the Low Voltage Detector (LVD) and Auxiliary Voltage
Detector (AVD).
s
LVD secures the power up and power down stages by keeping the MCU in reset state. There
is no need for an external reset generator.
AVD generates an interrupt when the voltage crosses the threshold voltage. This interrupt
can be used as an early warning of an imminent LVD reset so software can perform a safe
shut down.
s
Useful Tips:
Safe Shutdown with AVD Interrupt
Using the AVD interrupt, the application can store the application
context in emulated Data EEPROM before the LVD generates a reset.
For more information, refer to:
AN1502: Emulated Data EEPROM with ST7 HDFlash memory
2.4 NESTED INTERRUPTS
Nested or concurrent interrupt management with:
s
s
Flexible interrupt priority and level management.
Up to 4 software programmable nesting levels.
This allows easy implementation of a priority based interrupt driven architecture. The device
also has 4 vectors for external interrupts which allows for fast and flexible implementation of
external interrupt handling.
5/14