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 document is to highlight the differences so you can write software which will run without modification on both the ST72521 emulator and the ST72324 target. Only functional aspects will be covered. Electrical characteristics and Flash programming aspects that cannot be tested on 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 1 2 ST72521 Emulator chip version Cut 1.3 Cut 1.6 ST72324 Chip Version Cut 1.0 Cut 1.0 2 ST72521 CUT 1.3 VERSUS ST72324 CUT 1.0 This section describes all the differences between the emulator device and the target 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 the ST72521 emulator chip cut 1.3, there is no Schmitt Trigger hysteresis (Vil=Vih) on pins which have no Alternate Function Input. Impact on Software: The Schmitt Trigger cannot be debugged on this version of the emulator. No impact on software. AN1446/0801 1/3 1 USING THE ST72521 EMULATOR 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 emulator. 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 interrupt 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 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 interrupt 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 DEBUG A ST72324 TARGET APPLICATION "THE PRESENT NOTE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS 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 implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not authorized for use as critical components in life support devices or systems without the express written approval of STMicroelectronics. The ST logo is a registered trademark of STMicroelectronics 2001 STMicroelectronics - All Rights Reserved. Purchase of I2C Components by STMicroelectronics conveys a license under the Philips I2C Patent. Rights to use these components in an I2C system is granted provided that the system conforms to the I2C Standard Specification as defined by Philips. STMicroelectronics Group of Companies Australia - Brazil - China - Finland - France - Germany - Hong Kong - India - Italy - Japan - Malaysia - Malta - Morocco - Singapore - Spain Sweden - Switzerland - United Kingdom - U.S.A. http://www.st.com 3/3