ST AN1752 Application note

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 hel pful pointer s to hel p you c hoose the r ight tool for the dev elopment
environment and start working with ST72324. In each secti on of this ap plic ation note , you w ill fi nd ma ny use ful te chni cal t ips to he lp yo u
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 FEAT URES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 FEAT URES FOR MORE RELIABILIT Y . . . . . . . . . . . . . . . . . . . . 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 CO DE DEVELOPMEN T TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.1 ST7 Assembl e r and Linker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.2 C Compiler toolchains from C o sm ic and Metrowerks . . . . . . . . . . . . . . . . . 9
3.1.3 ST7 Software Library: ST7LIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 DEBUGGING TOOL S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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: ST7M DT20J-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 REFER EN CE 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 8 to 32k dual voltage Flash or ROM with Read-out protection capability RAM 384 to 1K bytes Package SDIP42, TQFP44 10x10,SDIP32, TQFP32 7x7
Up to 32 I/O ports
Number of I/O ports
Clock Source
Power Sa vin g M odes Halt, Active-Halt, Wait and Slow
Interrupt M a nagement
Operating Voltage 3.8V to 5.5V Temperature Range -40°C to +125°C A/D 10-bit A/D with up to 12 input pins
Timers
Communication Peripherals
Instruction Set
Special Features In-Application Programming and In-Circuit Programming
– 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
– Nested interrupt controller – 10 interru pt vectors plus TRAP and RESET – 9/6 external interrupt lines (on 4 vectors)
– Main Clock Controller with: Real time base, Beep and Clock-out ca­pabilities
– Configurable watchdog timer – Two 16-bit timers with input capture, output compare and PWM
modes – 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
3/14
ST72324 QUICK REFEREN CE NOTE

2 ST72324 KEY BENEFITS

2.1 8-BIT SOLUTION FOR MID-RANGE APPLICATIONS

The device offers the following state-of-the-art benefits:
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 R OM 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.
Useful Tips: Emulate Data E2PROM 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 EEP ROM with ST7 HDFlash memor y

2.2 ENHANCED CLOCK MANAGEMENT MODULE

This module allows you to select different main clock sources:
An external source
4 crystal or ceramic resonator oscillator types
An internal high frequency oscillator
Each o scilla tor is op timi zed fo r a g iven f requ ency in t erms of c ons um ptio n. Thi s c an be se ­lected through the option byte.
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 REFER EN CE 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).
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 immi nent LVD reset so software can perform a safe shut down.
Useful Tips: Safe Shutdown w ith 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 EEP ROM with ST7 HDFlash memor y

2.4 NESTED INTERRUPTS

Nested or concurrent interrupt management with:
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 ex ternal interrupts whi ch allows for f ast and flexible impl ementation of external interrupt handling.
5/14
Loading...
+ 9 hidden pages