ST AN1446 APPLICATION NOTE

AN1446/0801 1/3
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
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
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.
ST72521 Emulator chip version ST72324 Chip Version
1 Cut 1.3 Cut 1.0
2 Cut 1.6 Cut 1.0
1
2/3
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.
Loading...
+ 1 hidden pages