Porting an application from the ST10F269Zx to the ST10F273Z4
Introduction
The ST10F273Z4 is a derivative of the STMicroelectronics ST10 family of 16-bit single-chip
CMOS microcontrollers and is functionally upwardly compatible with the ST10F269Zx.
The goal of this document is to highlight the differences between the ST10F269Zx and the
ST10F273Z4 devices. It is intended for hardware or software designers who are adapting an
existing application based on the ST10F269Zx to the ST10F273Z4.
This document first presents the modified functionalities of the ST10F273Z4, and then
presents the new functionalities before looking at the modified and the new registers. In
each section of the document, differences with the ST10F269Zx that may have an impact
are stressed and some advice is given on how best to handle these differences and impacts.
Ta bl e 1 below summarizes the modifications made in the pinout.
Table 1.Pinout modifications table
.
Pin
No.
17DC2
56DC1
99EA
143V
144V
NameFunctionNameFunction
SS
DD
1.1.2 Pin 17
ST10F269ZxST10F273Z4
Internal voltage regulator decoupling.
Connect to nearest V
capacitor.
Internal voltage regulator decoupling.
Connect to nearest VSS via a 330nF
capacitor.
Selects code execution out of internal
Flash or external memory according
to level during reset
Ground pinXTAL3
5V power supply pinXTAL4
via a 330nF
SS
V
V
EA-V
5V power supply pin
DD
Internal voltage regulator decoupling.
Connect to nearest V
18
capacitor.
Selects code execution out of internal
Flash or external memory according to
STBY
level during reset. Power supply input for
standby mode.
Input to the 32 kHz oscillator amplifier
circuit. If not used should be tied to
ground to avoid consumption. In addition,
bit OFF32 in RTCCON register should be
set.
Output of the 32 kHz oscillator amplifier
circuit. If not used should be left open to
avoid spurious consumption.
via a 10 - 100nF
SS
In the ST10F269Zx, a decoupling capacitor of 330nF minimum has to be connected
between pin 17 (named DC2) and the nearest V
This is no longer the case in the ST10F273Z4 device where pin 17 is a V
SS
pin.
DD
pin.
Hardware impacts
PCB must be adapted.
Software impacts
None.
5/35
Modified featuresAN2556
1.1.3 Pin 56
In the ST10F269Zx, a decoupling capacitor of 330nF minimum has to be connected
between pin 56 (named DC1) and the nearest V
In the ST10F273Z4, pin 56 is named V
and a capacitor with a value between 10nF
18
minimum and 100nF maximum must be connected between it and the nearest V
SS
pin.
SS
pin.
Hardware impacts
The capacitor value may need to be changed. As the value is much lower, the footprint of
the capacitor might be smaller and thus a modification of the PCB may be needed.
Software impacts
None.
1.1.4 Pin 99
In the ST10F269Zx, pin 99 is named EA and when it is reset it is used to select the start
from internal Flash or external memory.
Pin 99 now has an additional function in the ST10F273Z4 which is to provide the 5V power
supply to the device in standby mode (new power saving mode). It is therefore named EA
V
.
STBY
-
Hardware impacts
Modification depends on the previous use of the ST10F269Zx and on the use or non-use of
Standby mode.
For an application that does not use Standby mode, no change is required on the PCB. If the
new application uses the Standby mode, the EA
common 5V and have a specific supply path.
Software impacts
None.
1.1.5 Pins 143 and 144
These pins are a VSS-VDD pair in the ST10F269Zx. In the ST10F273Z4, they are now used
as an XTAL3-XTAL4 pair for connection to an optional 32 kHz crystal to clock the Real Time
Clock during Power-Down.
Hardware impacts
The PCB must be redesigned.
In case the optional 32 kHz is not used:
●XTAL3 must be linked to Ground as was previously the case for ST10F269Zx.
●XTAL4 can be left open or it may be connected to Ground via a capacitor to reduce the
potential effect of RF noise which could be propagated inside the device if it is left
floating.
-V
pin must be separated from the
STBY
6/35
AN2556Modified features
Software impacts
If the optional 32 kHz is not used, but the RTC is used, bit OFF32 of the RTCCON register
should be set. Prior to setting the OFF32 bit in RTCCON register, the RTC must be enabled
by setting RTCEN, bit 4 of XPERCON, and XPEN, bit 2 of SYSCON.
1.2 XRAM
The XRAM of the ST10F269Zx and ST10F273Z4 devices is not the same size. Each
configuration is detailed below.
The ST10F269Zx has 10 Kbytes of extension RAM whereas the ST10F273Z4 has 34
Kbytes.
The XRAM of the ST10F269Zx is divided into two ranges, namely, XRAM1 with 2 Kbytes
and XRAM2 with 8 Kbytes:
●The XRAM1 address range is 00’E000h - 00’E7FFh if enabled.
●The XRAM2 address range is 00’C000h - 00’DFFFh if enabled.
The XRAM of the ST10F273Z4 is divided into two ranges, namely, XRAM1 with 2 Kbytes
(compatible with the ST10F269Zx) and XRAM2 with 32 Kbytes (which has a user
reprogrammable address range):
●The XRAM1 address range is 00’E000h - 00’E7FFh if enabled (XPEN set - bit 2 of
SYSCON register - AND XRAM1EN set - bit 2 of XPERCON register).
●The XRAM2 address range is 0F’0000h - 0F’7FFFh, by default (compatible with
ST10F273Z4 superset) if enabled (XPEN set - bit 2 of SYSCON register - AND
XRAM2EN set - bit 3 of XPERCON register).
1.2.1 Hardware impacts
None.
1.2.2 Software impacts
There is no change when enabling the XRAM blocks: The XPERCON register is still used to
enable them via the XRAM1EN and XRAM2EN bits and the XPEN bit of SYSCON.
In the ST10 F273Z4 the memory mapping of the application is impacted by the difference in
XRAM size and by the location of XRAM2 in segment 15. In the ST10F269Zx the whole
XRAM is in page 3 of segment 0.
Variables and PEC transfers
For architectural reasons, the PEC destination and source pointers must be in segment 0.
Therefore all RAM variables and arrays that will be PEC addressed must be located within
either the DPRAM (00’F600h - 00’FDFFh) or the XRAM1 (00’E000h - 00’E7FFh).
About Toolchain memory model
A change in the Toolchain configuration is needed to take into account the new location of
XRAM2. In the ST10F269Zx, all the XRAM is in page 3 which is then automatically
addressed using DPP3 that points to page 3 (in order to access the DPRAM and the
SFR/ESFR). In the ST10F273Z4, it is necessary to dedicate a DPP to access some of the
XRAM2.
7/35
Modified featuresAN2556
Example in case of Small Memory Model with Tasking toolchain:
The Small Memory Model allows a total code size from 16 Mbytes up to 64 Kbytes of fast
accessible 'normal user data' in three different memory configurations with the possibility to
access more data, if more than 64 Kbytes of data is needed.
The three memory configurations possible for this 64K of 'normal user data' are:
●Default
Four DPP registers are assumed to contain their system startup value (0-3), providing
one linear data area of 64 Kbytes in the first segment (00’0000h - 00’FFFFh).
●Linear Address
DPP3 contains page number 3, allowing access to SYSTEM (extended) SFR registers
and a bit-addressable memory. DPP0 - DPP2 provides a linear data area of 48 Kbytes
anywhere in the memory.
●Paged
DPP3 contains page number 3, allowing access to SYSTEM (extended) SFR registers
and a bit-addressable memory. DPP0, DPP1 and DPP2 contain a page number of a
data area of 16 Kbytes anywhere in the memory.
The Default configuration can no longer be used. The other configurations offer the following
possibilities:
●Using Linear Address configuration, nearly all the XRAM2 block is covered with DPPs
but then access to constants must be made via EXTP instructions.
●Paged configuration allows the user to assign up to two DPPs to XRAM2 and one DPP
Table 3: Flash memories mapping on page 9 shows the differences between the
ST10F273Z4 and the ST10F269Zx.
1.3.1 Hardware impacts
None.
1.3.2 Software impacts
Mapping of the applications is impacted because in the ST10F273Z4 the first 32 Kbytes of
Flash are divided into four sectors of 8 Kbytes each, whereas the ST10F269Zx has only
three sectors.
8/35
AN2556Modified features
Moreover, the Flash Write/Erase controller is different and therefore the programming
routines must be updated.
When the XPEN bit of the SYSCON register and the XRAM2EN bit of XPERCON register
are set, access to the address range 09’0000h - 0D’FFFFh is not redirected to the external
memory. The linker-locator configuration of the toolchain should be checked in order to
prevent use of this memory range.
Note:This range can be redirected to the external memory by changing the value of the register
XADRS3. Refer to Section 4.1: XADRS3 register for more details.
The Analog Digital converter has been redesigned in the ST10F273Z4. The ST10F273Z4
still provides an Analog/Digital converter with 10-bit resolution and a sample & hold circuit
on-chip.
00’2000 - 00’3FFFIBank 0, Block 1: 8 Kbytes
00’0000 - 00’1FFFIBank 0, Block 0: 8 Kbytes
9/35
Modified featuresAN2556
1.4.1 Hardware/software impacts: conversion timing control
The A/D Converter is not fully compatible with the ST10F269Zx (timing and programming
model). In the ST10F269Zx, the sample time (for loading the capacitors) and the conversion
time is programmable and can be adjusted to the external circuitry. The total conversion time
is compatible with the formula used for the ST10F269Zx, but the meaning of the field bits
ADCTC and ADSTC are no longer compatible
Table 4.ST10F273Z4 conversion timing table
ADCTC ADSTCSampleComparisonExtraTotal conversion
0000TCL * 120TCL * 240TCL * 28TCL * 388
0001TCL * 140TCL * 280TCL * 16TCL * 436
0010TCL * 200TCL * 280TCL * 52TCL * 532
0011TCL * 400TCL * 280TCL * 44TCL * 724
1100TCL * 240TCL * 120TCL * 52TCL * 772
1101TCL * 280TCL * 560TCL * 28TCL * 868
1110TCL * 400TCL * 560TCL * 100TCL * 1060
1111TCL * 800TCL * 560TCL * 52TCL * 1444
1000TCL * 480TCL * 960TCL * 100TCL * 1540
1001TCL * 560TCL * 1120TCL * 52TCL * 1732
1010TCL * 800TCL * 1120TCL * 196TCL * 2116
1011TCL * 1600TCL * 1120TCL * 164TCL * 2884
The user should take care of the sample time parameter: This is the time where the
capacitances of the converter are loaded via the respective analog input pin. Tab le 5 : ST10F273Z4 vs. ST10F269Zx sample time comparison table shows the differences in
sample time.
Table 5.ST10F273Z4 vs. ST10F269Zx sample time comparison table
ADCTCADSTC
0000TCL * 48TCL * 1202.500
0001TCL * 96TCL * 1401.4600
0010TCL * 192TCL * 2001.0400
0011TCL * 384TCL * 4001.0400
1100TCL * 96TCL * 2402.511
1101TCL * 192TCL * 2801.4611
1110TCL * 384TCL * 4001.0411
1111TCL * 768TCL * 8001.0411
ST10F269Zx
sample time
ST10F273Z4
sample time
Ratio
F273Z4_time /
F269_time
ADCTC
1000TCL * 192TCL * 4802.0810
1001TCL * 384TCL * 5601.4610
10/35
AN2556Modified features
Table 5.ST10F273Z4 vs. ST10F269Zx sample time comparison table (continued)
ADCTCADSTC
ST10F269Zx
sample time
ST10F273Z4
sample time
1010TCL * 768TCL * 8001.0410
1011TCL * 1536TCL * 16001.0410
In the default configuration, the sample time of the ST10F273Z4 is 2.5 times longer
compared to the ST10F269Zx. This has an impact on the frequency of the input signal that
can be applied to the ST10F273Z4.