ST AN1446 APPLICATION NOTE

AN1446
APPLICATION NOTE
USING THE ST72521 EMULATOR TO DEBUG A ST72324
TARGET APPLICATION
by Microcontroller Division Applications
1 PURPOSE AND SCOPE OF THIS DOCUMENT
The ST72521 emulator is able to support development of software for the ST72324 target MCU because the ST72521 and ST72324 are essentially compatible. The purpose of this doc­ument is to highlight the differences so you can write software which will run without modifica­tion on both the ST 72521 em ulator an d the ST7232 4 target. O nly func tional aspects will be covered. Electr ical char acter istics and Flash progr amming as pects tha t cann ot b e t ested o n the emulator are not covered by this document. Due to the fact that the ST72521 emulator has been delivered in two versions, this document is divided into 2 sections corresponding to the following emulator versions and ST72324 silicon version.
Table 1. List of Emulator and Target MCU versions
ST72521 Emulator chip version ST72324 Chip Version
1 Cut 1.3 Cut 1.0 2 Cut 1.6 Cut 1.0
2 ST72521 CUT 1.3 VERSUS ST72324 CUT 1.0
This section describes all the differences between the emul ator device and the tar get device and describes the impact on your software, that is how you need to implement your software so it will run without change in both the emulator and the target chip.
2.1 SCHMITT TRIGGERS Description: On th e ST 7252 1 em ul ator chi p cut 1 .3, t here is n o Schm it t T rig ger hys te resis
(Vil=Vih) on pins which have no Alternate Function Input. Impact on Software: The Sc h mitt T rigge r c an not b e deb ug ged o n this ve rsion o f the e mu-
lator. No impact on software.
AN1446/0801 1/3
1
USING THE ST72521 EM ULATOR TO DEBUG A ST72324 TARGET APPLICATION
2.2 SPI OVERRUN FLAG Description: On the ST72521 emulator chip cut 1.3, some overrun errors cannot be detected
during status register clearing phase. This behavior has been solved on the ST72324. Impact on Software: The overrun condition cannot be debugged on this version of the emu-
lator. No impact on software.
2.3 IC2 AND OC2 ON TIMER A Description: In the ST72324, the IC2 and OC2 functions are not available on Timer A. They
are available in the ST72521.
Impact on Software:
1. The OC2HR, OC2LR, IC2HR, IC2LR registers must not be accessed (except for the action in item 6 of this list).
2. The FOLV2 and OLVL2 control bits in the CR1 register must be kept cleared.
3. The OC2E and IEDG2 control bits in the CR2 register must be kept cleared.
4. The ICF2 and OCF2 flag values must not be taken into account by the software (meaningless).
5. Timer A PWM mode must not be used: The PWM control bit in the CR2 register must be kept cleared. The generated PWM signal would be different on the ST72521 and ST72324.
6. A dummy read to the OC2LR and IC2LR registers has to be performed at the end of the Timer A inter­rupt routine to discard the OC2 and IC2 interrupts that can occur on the ST72521 but not on the ST72324.
3 ST72521 CUT 1.6 VERSUS ST72324 CUT 1.0
3.1 IC2 AND OC2 ON TIMER A
Description: In the ST72324 the IC2 and O C2 functions are not available on T imer A . They
are available in the ST72521.
Impact on Software:
1. The OC2HR, OC2LR, IC2HR, IC2LR registers must not be accessed (except for the action in item 6 of this list).
2. The FOLV2 and OLVL2 control bits in the CR1 register must be kept cleared.
3. The OC2E and IEDG2 control bits in the CR2 register must be kept cleared.
4. The ICF2 and OCF2 flag values must not be taken into account by the software (meaningless).
5. Timer A PWM mode must not be used: The PWM control bit in the CR2 register must be kept cleared. The generated PWM signal would be different on the ST72521 and ST72324.
6. A dummy read to the OC2LR and IC2LR registers has to be performed at the end of the Timer A inter­rupt routine to discard the OC2 and IC2 interrupts that can occur on the ST72521 but not on the ST72324.
2/3
USING THE ST72521 EMULATOR TO DEBU G A ST72324 TARGET APPLICATION
"THE PRESENT NOTE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH INFORMATION REGARDING THE IR PRO DUCT S IN OR DER FO R THEM TO SAV E TIME . AS A RES ULT, STMIC ROEL ECTR ONI CS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH A NOTE AND/OR THE USE MADE BY CUSTOMERS OF THE INFORMATION CONTAINED HEREIN IN CONNEXION WITH THEIR PRODUCTS."
Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by implic ation or otherwise under any patent or patent ri ghts of STM i croelectr oni cs. Specifications mentioned in thi s publicati on are subject to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not authorized for use as cri tical comp onents in life support dev i ces or systems wi thout the express written approv al of STMicroel e ctronics.
The ST logo is a registered trademark of STMicroelectronics
2001 STMicroelectronics - All Rights Reserved.
Purchase of I
Australi a - Brazil - China - Finland - France - Germany - Hong Kong - India - Italy - Japan - Malaysia - Malt a - Morocco - Singapore - Spain
2
C Components by STMicroelectronics conveys a license under the Philips I2C Patent. Rights to use the se components in an
2
C system i s granted pro vid ed that the sy stem conforms to the I2C Standard Specification as defined by Philips.
I
STMicroelectronics Group of Compan i es
Sweden - Switzerland - United K i ngdom - U.S. A.
http://www.s t. com
3/3
Loading...