16-bit MCU with 512 Kbyte Flash memory and 36 Kbyte RAM
Features
■ High performance 16-bit CPU with DSP
functions
– 31.25 ns instruction cycle time at 64 MHz
max CPU clock
– Multiply/accumulate unit (MAC) 16 x 16-bit
multiplication, 40-bit accumulator
– Enhanced boolean bit manipulations
– Single-cycle context switching support
■ Memory organization
– 512 Kbyte on-chip Flash memory single
voltage with erase/program controller (full
performance, 32-bit fetch)
– 100K erasing/programming cycles.
– Up to 16 Mbyte linear address space for
code and data (5 Mbytes with CAN or I
– 2 Kbyte on-chip internal RAM (IRAM)
– 34 Kbyte on-chip extension RAM (XRAM)
– Pro grammable external bus configuration &
characteristics for different address ranges
– 5 programmable chip-select signals
– Hold-acknowledge bus arbitration support
■ Interrupt
– 8-channel peripheral event controller for
single cycle interrupt driven data transfer
– 16-priority-level interrupt system with 56
The ST10F273Z4 device is a derivative of the STMicroelectronics ST10 family of 16-bit
single-chip CMOS microcontrollers.
The ST10F273Z4 combines high CPU performance (up to 32 million instructions per
second) with high peripheral functionality and enhanced I/O-capabilities. It also provides onchip high-speed single voltage Flash memory, on-chip high-speed RAM, and clock
generation via PLL.
ST10F273Z4 is processed in 0.18mm CMOS technology. The MCU core and the logic is
supplied with a 5 V to 1.8 V on-chip voltage regulator. The part is supplied with a single 5 V
supply and I/Os work at 5 V.
The device is upward compatible with the ST10F269 device, with the following set of
differences:
●Flash control interface is now based on STMicroelectronics third generation of stand-
alone Flash memories (M29F400 series), with an embedded Program/Erase Controller.
This completely frees up the CPU during programming or erasing the Flash.
●Only one supply pin (ex DC1 in ST10F269, renamed into V18) on the QFP144 package
is used for decoupling the internally generated 1.8V core logic supply. Do not connect
this pin to 5.0 V external supply. Instead, this pin should be connected to a decoupling
capacitor (ceramic type, typical value 10nF, maximum value 100nF).
●The AC and DC parameters are modified due to a difference in the maximum CPU
frequency.
●A new V
●EA pin assumes a new alternate functionality: it is also used to provide a dedicated
power supply (see VSTBY) to maintain biased a portion of the XRAM (16 Kbytes) when
the main Power Supply of the device (V
V18) is turned off for low power mode, allowing data retention. VSTBY voltage shall be
in the range 4.5 to 5.5 volts and a dedicated embedded low power voltage regulator is
in charge to provide the 1.8 V for the RAM, the low-voltage section of the 32 kHz
oscillator and the Real-Time Clock module when not disabled. It is allowed to exceed
the upper limit up to 6 V for a very short period of time during the global life of the
device and exceed the lower limit down to 4 V when RTC and 32 kHz on-chip oscillator
are not used.
●A second SSC mapped on the XBUS is added (SSC of ST10F269 becomes here
SSC0, while the new one is referred as XSSC or simply SSC1). Note that some
restrictions and functional differences due to the XBUS peculiarities are present
between the classic SSC and the new XSSC.
●A second ASC mapped on the XBUS is added (ASC0 of ST10F269 remains ASC0,
while the new one is referred as XASC or simply as ASC1). Note that some restrictions
and functional differences due to the XBUS peculiarities are present between the
classic ASC and the new XASC.
●A second PWM mapped on the XBUS is added (PWM of ST10F269 becomes here
PWM0, while the new one is referred as XPWM or simply as PWM1). Note that some
pin replaces DC2 of ST10F269.
DD
and consequently the internally generated
DD
11/188
IntroductionST10F273Z4
restrictions and functional differences due to the XBUS peculiarities are present
between the classic PWM and the new XPWM.
●An I2C interface on the XBUS is added (see X-I2C or simply I2C interface).
●CLKOUT function can output either the CPU clock (like in ST10F269) or a software
programmable prescaled value of the CPU clock.
●On-chip RAM memory and FLASH size have been increased.
●PLL multiplication factors have been adapted to new frequency range.
●A/D Converter is not fully compatible versus ST10F269 (timing and programming
model). Formula for the conversion time is still valid, while the sampling phase
programming model is different.
Besides, additional 8 channels are available on P1L pins as alternate function: The
accuracy reachable with these extra channels is reduced with respect to the standard
Port5 channels.
●External Memory bus is affected by limitations on maximum speed and maximum
capacitance load: ST10F273Z4 is not able to address an external memory at 64 MHz
with 0 wait states.
●XPERCON register bit mapping modified according to new peripherals implementation
(not fully compatible with ST10F269).
●Bondout chip for emulation (ST10R201) cannot achieve more than 50MHz at room
temperature (so no real-time emulation possible at maximum speed).
●Input section characteristics are different. The threshold programmability is extended to
all port pins (additional XPICON register); it is possible to select standard TTL (with up
to 400mV of hysteresis) and standard CMOS (with up to 750mV of hysteresis).
●Output transition is not programmable.
●CAN module is enhanced: ST10F273Z4 implements two C-CAN modules, so the
programming model is slightly different. Besides, the possibility to map in parallel the
two CAN modules is added (on P4.5/P4.6).
●On-chip main oscillator input frequency range has been reshaped, reducing it from 1 to
25 MHz down to 4 to 12 MHz. This is a low power oscillator amplifier, that allows a
power consumption reduction when Real-Time Clock is running in Power down mode,
using as reference the on-chip main oscillator clock. When this on-chip amplifier is
used as reference for Real-Time Clock module, the Power-down consumption is
dominated by the consumption of the oscillator amplifier itself.
●A second on-chip oscillator amplifier circuit (32 kHz) is implemented for low power
modes: it can be used to provide the reference to the Real-Time Clock counter (either
in Power down or Stand-by mode). Pin XTAL3 and XTAL4 replace a couple of V
8-bit bidirectional I/O port, bit-wise programmable for input or output via direction
bit. Programming an I/O pin as input forces the corresponding output driver to
1 - 8I/O
high impedance state. Port 6 outputs can be configured as push-pull or open
drain drivers. The input threshold of Port 6 is selectable (TTL or CMOS). The
following Port 6 pins have alternate functions:
8-bit bidirectional I/O port, bit-wise programmable for input or output via direction
bit. Programming an I/O pin as input forces the corresponding output driver to
9-16I/O
high impedance state. Port 8 outputs can be configured as push-pull or open
drain drivers. The input threshold of Port 8 is selectable (TTL or CMOS).
The following Port 8 pins have alternate functions:
OTxD1ASC1: Clock / Data output (Asynchronous/Synchronous)
15/188
Pin dataST10F273Z4
Table 2.Pin description (continued)
SymbolPinTypeFunction
8-bit bidirectional I/O port, bit-wise programmable for input or output via direction
bit. Programming an I/O pin as input forces the corresponding output driver to
39IP5.10T6EUDGPT2: timer T6 external up/down control input
40IP5.11T5EUDGPT2: timer T5 external up/down control input
41IP5.12T6INGPT2: timer T6 count input
42IP5.13T5INGPT2: timer T5 count input
43IP5.14T4EUDGPT1: timer T4 external up/down control input
high impedance state. Port 7 outputs can be configured as push-pull or open
drain drivers. The input threshold of Port 7 is selectable (TTL or CMOS).
The following Port 7 pins have alternate functions:
16-bit input-only port with Schmitt-Trigger characteristics. The pins of Port 5 can
be the analog input channels (up to 16) for the A/D converter, where P5.x equals
I
ANx (Analog input channel x), or they are timer inputs. The input threshold of
I
Port 5 is selectable (TTL or CMOS). The following Port 5 pins have alternate
functions:
P2.0 - P2.7
P2.8 - P2.15
44IP5.15T2EUDGPT1: timer T2 external up/down control input
16-bit bidirectional I/O port, bit-wise programmable for input or output via
direction bit. Programming an I/O pin as input forces the corresponding output
I/O
driver to high impedance state. Port 2 outputs can be configured as push-pull or
open drain drivers. The input threshold of Port 2 is selectable (TTL or CMOS).
The following Port 2 pins have alternate functions:
IEX0INFast external interrupt 0 input
IEX7INFast external interrupt 7 input
IT7INCAPCOM2: timer T7 count input
16/188
ST10F273Z4Pin data
Table 2.Pin description (continued)
SymbolPinTypeFunction
15-bit (P3.14 is missing) bidirectional I/O port, bit-wise programmable for input or
65-70,
73-80,
81
65IP3.0T0INCAPCOM1: timer T0 count input
66OP3.1T6OUTGPT2: timer T6 toggle latch output
67IP3.2CAPINGPT2: register CAPREL capture input
68OP3.3T3OUTGPT1: timer T3 toggle latch output
69IP3.4T3EUDGPT1: timer T3 external up/down control input
I/O
output via direction bit. Programming an I/O pin as input forces the
I/O
corresponding output driver to high impedance state. Port 3 outputs can be
I/O
configured as push-pull or open drain drivers. The input threshold of Port 3 is
selectable (TTL or CMOS). The following Port 3 pins have alternate functions:
P3.0 - P3.5
P3.6 - P3.13,
P3.15
70IP3.5T4INGPT1; timer T4 input for count/gate/reload/capture
73IP3.6T3INGPT1: timer T3 count/gate input
74IP3.7T2INGPT1: timer T2 input for count/gate/reload / capture
System clock output (programmable divider on CPU
clock)
17/188
Pin dataST10F273Z4
Table 2.Pin description (continued)
SymbolPinTypeFunction
Port 4 is an 8-bit bidirectional I/O port. It is bit-wise programmable for input or
output via direction bit. Programming an I/O pin as input forces the
corresponding output driver to high impedance state. The input threshold is
85-92I/O
85OP4.0A16Segment address line
86OP4.1A17Segment address line
87OP4.2A18Segment address line
88OP4.3A19Segment address line
89OP4.4A20Segment address line
P4.0 –P4.7
90OP4.5A21Segment address line
91OP4.6A22Segment address line
selectable (TTL or CMOS). Port 4.4, 4.5, 4.6 and 4.7 outputs can be configured
as push-pull or open drain drivers.
In case of an external bus configuration, Port 4 can be used to output the
segment address lines:
ICAN2_RxD CAN2: receive data input
I/OSCL
I2C Interface: serial clock
ICAN1_RxD CAN1: receive data input
ICAN2_RxD CAN2: receive data input
92OP4.7A23Most significant segment address line
RD95O
/WRL96O
WR
READY/
READY
97I
ALE98O
OCAN1_TxDCAN1: transmit data output
OCAN2_TxDCAN2: transmit data output
OCAN2_TxDCAN2: transmit data output
I/OSDA
External memory read strobe. RD
I2C Interface: serial data
is activated for every external instruction or
data read access.
External memory write strobe. In WR
external data write access. In WRL
-mode this pin is activated for every
mode this pin is activated for low byte data
write accesses on a 16-bit bus, and for every data write access on an 8-bit bus.
See WRCFG in the SYSCON register for mode selection.
Ready input. The active level is programmable. When the ready function is
enabled, the selected inactive level at this pin, during an external memory
access, will force the insertion of waitstate cycles until the pin returns to the
selected active level.
Address latch enable output. In case of use of external addressing or of
multiplexed mode, this signal is the latch command of the address lines.
18/188
ST10F273Z4Pin data
Table 2.Pin description (continued)
SymbolPinTypeFunction
External access enable pin.
A low level applied to this pin during and after Reset forces the ST10F273Z4 to
start the program from the external memory space. A high level forces
ST10F273Z4 to start in the internal memory space. This pin is also used (when
DD
DD
EA / V
STBY
P0L.0 -P0L.7,
P0H.0
P0H.1 - P0H.7
99I
100-107,
108,
111-117
Stand-by mode is entered, that is ST10F273Z4 under reset and main V
turned off) to bias the 32 kHz oscillator amplifier circuit and to provide a
reference voltage for the low-power embedded voltage regulator which
generates the internal 1.8V supply for the RTC module (when not disabled) and
to retain data inside the Stand-by portion of the XRAM (16Kbyte).
It can range from 4.5 to 5.5V (6V for a reduced amount of time during the device
life, 4.0V when RTC and 32 kHz on-chip oscillator amplifier are turned off). In
running mode, this pin can be tied low during reset without affecting 32 kHz
oscillator, RTC and XRAM activities, since the presence of a stable V
guarantees the proper biasing of all those modules.
Two 8-bit bidirectional I/O ports P0L and P0H, bit-wise programmable for input or
output via direction bit. Programming an I/O pin as input forces the
corresponding output driver to high impedance state. The input threshold of
Port 0 is selectable (TTL or CMOS).
In case of an external bus configuration, PORT0 serves as the address (A) and
as the address / data (AD) bus in multiplexed bus modes and as the data (D) bus
in demultiplexed bus modes.
Demultiplexed bus modes
Data path width8-bit16-bi
I/O
P0L.0 – P0L.7:D0 – D7D0 - D7
P0H.0 – P0H.7:I/OD8 - D15
P1L.0 - P1L.7
P1H.0 - P1H.7
Multiplexed bus modes
Data path width8-bit16-bi
P0L.0 – P0L.7:AD0 – AD7AD0 - AD7
P0H.0 – P0H.7:A8 – A15AD8 - AD15
Two 8-bit bidirectional I/O ports P1L and P1H, bit-wise programmable for input or
output via direction bit. Programming an I/O pin as input forces the
corresponding output driver to high impedance state. PORT1 is used as the 16bit address bus (A) in demultiplexed bus modes: if at least BUSCONx is
118-125
128-135
configured such the demultiplexed mode is selected, the pis of PORT1 are not
available for general purpose I/O function. The input threshold of Port 1 is
I/O
selectable (TTL or CMOS).
The pins of P1L also serve as the additional (up to 8) analog input channels for
the A/D converter, where P1L.x equals ANy (Analog input channel y,
where y = x + 16). This additional function have higher priority on demultiplexed
bus function. The following PORT1 pins have alternate functions:
132IP1H.4 CC24IOCAPCOM2: CC24 capture input
133IP1H.5 CC25IOCAPCOM2: CC25 capture input
134IP1H.6 CC26IOCAPCOM2: CC26 capture input
135IP1H.7 CC27IOCAPCOM2: CC27 capture input
19/188
Pin dataST10F273Z4
Table 2.Pin description (continued)
SymbolPinTypeFunction
XTAL1138IXTAL1 Main oscillator amplifier circuit and/or external clock input.
XTAL2137OXTAL2 Main oscillator amplifier circuit output.
To clock the device from an external source, drive XTAL1 while leaving XTAL2
unconnected. Minimum and maximum high / low and rise / fall times specified in
the AC Characteristics must be observed.
When 32 kHz oscillator amplifier is not used, to avoid spurious consumption,
XTAL3 shall be tied to ground while XTAL4 shall be left open. Besides, bit OFF32
in RTCCON register shall be set. 32 kHz oscillator can only be driven by an
external crystal, and not by a different clock source.
Reset Input with CMOS Schmitt-Trigger characteristics. A low level at this pin for
a specified duration while the oscillator is running resets the ST10F273Z4. An
RSTIN
RSTOUT
NMI
140I
141O
142I
internal pull-up resistor permits power-on reset using only a capacitor connected
. In bidirectional reset mode (enabled by setting bit BDRSTEN in
to V
SS
SYSCON register), the RSTIN
line is pulled low for the duration of the internal
reset sequence.
Internal Reset Indication Output. This pin is driven to a low level during
hardware, software or watchdog timer reset.
RSTOUT
remains low until the EINIT
(end of initialization) instruction is executed.
Non-Maskable Interrupt Input. A high to low transition at this pin causes the CPU
to vector to the NMI trap routine. If bit PWDCFG = ‘0’ in SYSCON register, when
the PWRDN (power down) instruction is executed, the NMI pin must be low in
order to force the ST10F273Z4 to go into power down mode. If NMI is high and
PWDCFG =’0’, when PWRDN is executed, the part will continue to run in normal
mode.
If not used, pin NMI
should be pulled high externally.
V
AREF
V
AGND
RPD84-
V
DD
37-A/D converter reference voltage and analog supply
38-A/D converter reference and analog ground
Timing pin for the return from interruptible power down mode and synchronous /
asynchronous reset selection.
17, 46,
72,82,93,
109, 126,
136
Digital supply voltage = + 5V during normal operation, idle and power down
-
modes.
It can be turned off when Stand-by RAM mode is selected.
18,45,
55,71,
V
SS
83,94,
-Digital ground
110, 127,
139
V
18
56-
1.8V decoupling pin: a decoupling capacitor (typical value of 10nF, max 100nF)
must be connected between this pin and nearest V
20/188
SS
pin.
ST10F273Z4Functional description
3 Functional description
The architecture of the ST10F273Z4 combines advantages of both RISC and CISC
processors and an advanced peripheral subsystem. The block diagram gives an overview of
the different on-chip components and the high bandwidth internal bus structure of the
ST10F273Z4.
Figure 3.Block diagram
16
IFlash
512K
32
CPU-core and MAC unit
16
IRAM
2K
32K (16K
XCAN1
16
16
8
XRAM
(PEC)
XRAM
STBY)
16
2K
16
16
16
XRTC
XI2C
Por t 0
Por t 1Por t 4
Por t 6
81615 8 8
16
16 16
16 16
XCAN2
External bus
XPWM
XASC
XSSC
controller
16
16
Por t 5
10-bit ADC
Interrupt controller
ASC0
GPT1 / GPT2
BRGBRG
Port 3Port 7Por t 8
PEC
SSC0
PWM
CAPCOM2
Watchdog
Oscillator
32 kHz
oscillator
PLL
5V-1.8V
voltage
regulator
CAPCOM1
16
Por t 2
21/188
Memory organizationST10F273Z4
4 Memory organization
The memory space of the ST10F273Z4 is configured in a unified memory architecture.
Code memory, data memory, registers and I/O ports are organized within the same linear
address space of 16 Mbytes. The entire memory space can be accessed Byte wise or Word
wise. Particular portions of the on-chip memory have additionally been made directly bit
addressable.
IFlash: 512 Kbytes of on-chip Flash memory. It is divided in 10 blocks (B0F0...B0F9) of the
Bank 0 and two blocks of Bank 1 (B1F0, B1F1): read-while-write operations inside the same
Bank are not allowed. When Bootstrap mode is selected, the Test-Flash Block B0TF
(8 Kbyte) appears at address 00’0000h: refer to Chapter 5: Internal Flash memory on
page 25 for more details on memory mapping in boot mode. The summary of address range
for IFlash is the following:
Table 3.Summary of IFlash address range
BlocksUser modeSize
B0TFNot visible8 K
B0F000’0000h - 00’1FFFh8 K
B0F100’2000h - 00’3FFFh8 K
B0F200’4000h - 00’5FFFh8 K
B0F300’6000h - 00’7FFFh8 K
B0F401’8000h - 01’FFFFh32K
B0F502’0000h - 02’FFFFh64K
B0F603’0000h - 03’FFFFh64K
B0F704’0000h - 04’FFFFh64K
B0F805’0000h - 05’FFFFh64K
B0F906’0000h - 06’FFFFh64K
B1F007’0000h - 07’FFFFh64K
B1F108’0000h - 08’FFFFh64K
IRAM: 2 Kbytes of on-chip internal RAM (dual-port) is provided as a storage for data,
system stack, general purpose register banks and code. A register bank is 16 Wordwide (R0
to R15) and / or Bytewide (RL0, RH0, …, RL7, RH7) general purpose registers group.
XRAM: 32 K + 2 Kbytes of on-chip extension RAM (single port XRAM) is provided as a
storage for data, user stack and code.
The XRAM is divided into two areas, the first 2 Kbytes named XRAM1 and the second
32 Kbytes named XRAM2, connected to the internal XBUS and are accessed like an
external memory in 16-bit demultiplexed bus-mode without wait state or read/write delay
(31.25ns access at 64 MHz CPU clock). Byte and Word accesses are allowed.
The XRAM1 address range is 00’E000h - 00’E7FFh if XPEN (bit 2 of SYSCON register),
and XRAM1EN (bit 2 of XPERCON register) are set. If XRAM1EN or XPEN is cleared, then
any access in the address range 00’E000h - 00’E7FFh will be directed to external memory
22/188
ST10F273Z4Memory organization
interface, using the BUSCONx register corresponding to address matching ADDRSELx
register.
The XRAM2 address range is F’0000h-F’7FFFFh if XPEN (bit 2 of SYSCON register), and
XRAM2EN (bit 3 of XPERCON register) are set. If bit XPEN is cleared, then any access in
the address range programmed for XRAM2 will be directed to external memory interface,
using the BUSCONx register corresponding to address matching ADDRSELx register.
The lower portion of the XRAM2 (address range F’0000h-F’3FFFFh) represents also the
Stand-by RAM, which can be maintained biased through EA
V
is turned off.
DD
/ VSTBY pin when main supply
As the XRAM appears like external memory, it cannot be used as system stack or as
register banks. The XRAM is not provided for single bit storage and therefore is not bit
addressable.
SFR/ESFR: 1024 bytes (2 x 512 bytes) of address space is reserved for the special function
register areas. SFRs are Wordwide registers which are used to control and to monitor the
function of the different on-chip units.
CAN1: Address range 00’EF00h - 00’EFFFh is reserved for the CAN1 Module access. The
CAN1 is enabled by setting XPEN bit 2 of the SYSCON register and by setting CAN1EN bit
0 of the XPERCON register. Accesses to the CAN Module use demultiplexed addresses
and a 16-bit data bus (only word accesses are possible). Two wait states give an access
time of 62.5ns at 64 MHz CPU clock. No tri-state wait states are used.
CAN2: Address range 00’EE00h - 00’EEFFh is reserved for the CAN2 Module access. The
CAN2 is enabled by setting XPEN bit 2 of the SYSCON register and by setting CAN2EN bit
1 of the new XPERCON register. Accesses to the CAN Module use demultiplexed
addresses and a 16-bit data bus (only word accesses are possible). Two wait states give an
access time of 62.5ns at 64 MHz CPU clock. No tri-state wait states are used.
If one or the two CAN modules are used, Port 4 cannot be programmed to output all eight
segment address lines. Thus, only four segment address lines can be used, reducing the
external memory space to 5 Mbytes (1 Mbyte per CS line).
RTC: Address range 00’ED00h - 00’EDFFh is reserved for the RTC Module access. The
RTC is enabled by setting XPEN bit 2 of the SYSCON register and bit 4 of the XPERCON
register. Accesses to the RTC Module use demultiplexed addresses and a 16-bit data bus
(only word accesses are possible). Two waitstates give an access time of 62.5ns at 64 MHz
CPU clock. No tristate waitstate is used.
PWM1: Address range 00’EC00h - 00’ECFFh is reserved for the PWM1 Module access.
The PWM1 is enabled by setting XPEN bit 2 of the SYSCON register and bit 6 of the
XPERCON register. Accesses to the PWM1 Module use demultiplexed addresses and a 16bit data bus (only word accesses are possible). Two waitstates give an access time of
62.5ns at 64MHz CPU clock. No tristate waitstate is used. Only word access is allowed.
ASC1: Address range 00’E900h - 00’E9FFh is reserved for the ASC1 Module access. The
ASC1 is enabled by setting XPEN bit 2 of the SYSCON register and bit 7 of the XPERCON
register. Accesses to the ASC1 Module use demultiplexed addresses and a 16-bit data bus
(only word accesses are possible). Two waitstates give an access time of 62.5 ns at 64 MHz
CPU clock. No tristate waitstate is used.
SSC1: Address range 00’E800h - 00’E8FFh is reserved for the SSC1 Module access. The
SSC1 is enabled by setting XPEN bit 2 of the SYSCON register and bit 8 of the XPERCON
register. Accesses to the SSC1 Module use demultiplexed addresses and a 16-bit data bus
23/188
Memory organizationST10F273Z4
(only word accesses are possible). Two waitstates give an access time of 62.5ns at 64 MHz
CPU clock. No tristate waitstate is used.
I2C: Address range 00’EA00h - 00’EAFFh is reserved for the I2C Module access. The I2C is
enabled by setting XPEN bit 2 of the SYSCON register and bit 9 of the XPERCON register.
Accesses to the I2C Module use demultiplexed addresses and a 16-bit data bus (only word
accesses are possible). Two waitstates give an access time of 62.5ns at 64 MHz CPU clock.
No tristate waitstate is used.
X-Miscellaneous: Address range 00’EB00h - 00’EBFFh is reserved for the access to a set
of XBUS additional features. They are enabled by setting XPEN bit 2 of the SYSCON
register and bit 10 of the XPERCON register. Accesses to this additional features use
demultiplexed addresses and a 16-bit data bus (only word accesses are possible). Two
waitstates give an access time of 62.5ns at 64 MHz CPU clock. No tristate waitstate is used.
The following set of features are provided:
●CLKOUT programmable divider
●XBUS interrupt management registers
●ADC multiplexing on P1L register
●Port1L digital disable register for extra ADC channels
●CAN2 multiplexing on P4.5/P4.6
●CAN1-2 main clock prescaler
●Main voltage regulator disable for Power-down mode
●TTL / CMOS threshold selection for Port0, Port1 and Port5.
In order to meet the needs of designs where more memory is required than is provided on
chip, up to 16 Mbytes of external memory can be connected to the microcontroller.
Visibility of XBUS peripherals
In order to keep the ST10F273Z4 compatible with the ST10F168 / ST10F269, the XBUS
peripherals can be selected to be visible on the external address / data bus. Different bits for
X-peripheral enabling in XPERCON register must be set. If these bits are cleared before the
global enabling with XPEN bit in SYSCON register, the corresponding address space, port
pins and interrupts are not occupied by the peripherals, thus the peripheral is not visible and
not available. Refer to Chapter 23: Register set on page 111.
24/188
ST10F273Z4Internal Flash memory
5 Internal Flash memory
5.1 Overview
The on-chip Flash is composed by one matrix module divided in two banks that can be read
and modified indipendently one of the other: one bank can be read while another bank is
under modification. Bank 0 is 384 Kbytes wide, Bank 1 is 128 Kbytes wide.
This module is on ST10 Internal bus, so it is called IFlash.
Figure 4.Flash structure
IFlash (Module I)
Bank 1: 128 Kbyte
program memory
Bank 0: 384 Kbyte
program memory
8 Kbyte test-Flash
+
I-BUS interface
The programming operations of the flash are managed by an embedded Flash
Program/Erase Controller (FPEC). The High Voltages needed for Program/Erase operations
are internally generated.
The Data bus is 32-bit wide for fetch accesses to IFlash, while it is 16-bit wide for read
accesses to IFlash. Read/write accesses to IFlash Control Registers area are 16-bit wide.
5.2 Functional description
Control Section
HV and Ref.
generator
Program/erase
controller
Flash control
registers
X-BUS interface
5.2.1 Structure
Following table shows the Address space reserved to the Flash module.
Table 4.Address space of the Flash module
IFlash sectors0x00 0000 to 0x08 FFFF512 Kbytes
Registers and Flash internal reserved area 0x0E 0000 to 0x0E FFFF64 Kbytes
DescriptionAddressesSize
25/188
Internal Flash memoryST10F273Z4
5.2.2 Modules structure
The IFlash module is composed by 2 banks: (Bank 0) contains 384 Kbytes of Program
Memory divided in 10 sectors (B0F0...B0F7), Bank 0 contains also a reserved sector named
Test-Flash. Bank 1 contains 128 Kbytes of Program Memory or Parameter divided in two
sectors (B1F0, B1F1, 64 Kbytes each). Addresses from 0x0E 0000 to 0x0E FFFF are
reserved for the Control Register Interface and other internal service memory space used
by the Flash Program/Erase controller.
The following tables show the memory mapping of the Flash when it is accessed in read
mode (Table 5: Flash modules sectorization (read operations)) and when accessed in write
or erase mode (Table 6: Flash modules sectorization): Note that with this second mapping,
the first four banks are remapped into code segment 1 (same as obtained setting bit
ROMS1 in SYSCON register).
The table above refers to the configuration when bit ROMS1 of SYSCON register is set.
When Bootstrap mode is entered:
●Test-Flash is seen and available for code fetches (address 00’0000h)
●User I-Flash is only available for read and write accesses
●Write accesses must be made with addresses starting in segment 1 from 01'0000h,
whatever ROMS1 bit in SYSCON value
●Read accesses are made in segment 0 or in segment 1 depending of ROMS1 value.
In Bootstrap mode, by default ROMS1 = 0, so the first 32 KBytes of IFlash are mapped in
segment 0.
Example:
In default configuration, to program address 0, user must put the value 01'0000h in the
FARL and FARH registers, but to verify the content of the address 0 a read to 00'0000h must
be performed.
Next Ta bl e 7 shows the Control Register interface composition: This set of registers can be
addressed by the CPU.
27/188
Internal Flash memoryST10F273Z4
Table 7.Control register interface
NameDescriptionAddressesSize
FCR1-0Flash control registers 1-00x000E 0000 - 0x000E 00078 byte
FDR1-0Flash data registers 1-00x000E 0008 - 0x000E 000F8 byte
The Flash module is automatically switched off executing PWRDN instruction. The
consumption is drastically reduced, but exiting this state can require a long time (t
Recovery time from Power down mode for the Flash modules is anyway shorter than the
main oscillator start-up time. To avoid any problem in restarting to fetch code from the Flash,
it is important to size properly the external circuit on RPD pin.
Note:PWRDN instruction must not be executed while a Flash program/erase operation is in
progress.
PD
).
Bus
size
16-bit
5.3 Write operation
The Flash module have one single register interface mapped in the memory space 0x0E
0000 to 0x0E 0015. All the operations are enabled through four 16-bit control registers:
Flash Control Register 1-0 High/Low (FCR1H/L-FCR0H/L). Eight other 16-bit registers are
used to store Flash Address and Data for Program operations (FARH/L and FDR1H/LFDR0H/L) and Write Operation Error flags (FERH/L). All registers are accessible with 8 and
16-bit instructions (since operates in 16-bit mode when in read/ write).
Before accessing the Flash registers used for program/erasing operations, bit 5
(XFLASHEN) in XPERCON register shall be set.
The two banks have their own dedicated sense amplifiers, so that one bank can be read
while the other is written.
During a Flash write operation, any attempt to read the bank under modification will output
invalid data (software trap 009Bh). This means that the Flash bank is not fetchable when a
programming operation is active: The write operation commands must be executed from
another bank or from the other memory (internal RAM or external memory).
During a Write operation, when bit LOCK of FCR0 is set, it is forbidden to write into the
Flash Control Registers.
28/188
ST10F273Z4Internal Flash memory
Power supply drop
If, during a write operation, the internal low voltage supply drops below a certain internal
voltage threshold, any write operation running is suddenly interrupted and the module is
reset to Read mode. At following Power-on, the interrupted Flash write operation must be
repeated.
5.4 Register description
5.4.1 Flash control register 0 low
The Flash Control Register 0 Low (FCR0L), together with the Flash Control Register 0 High
(FCR0H), is used to enable and to monitor all the write operations on the IFlash. The user
has no access in write mode to the Test-Flash (B0TF). Besides, Test-Flash block is seen by
the user in Bootstrap mode only.
FCR0L (0x0E 0000)FCRReset Value: 0000h
1514131211109876543210
reservedBSY1 BSY0 LOCK res.res.res.res.
RRR
Table 8.Flash control register 0 low
BitFunction
Bank 0:1 Busy (IFlash)
These bits indicate that a write operation is running on Bank 0 or Bank 1(IFlash). They are
automatically set when bit WMS is set. Setting Protection operation sets bits BSYx (since
BSY(1:0)
LOCK
protection registers are in this Block). When this bits are set, every read access to the
corresponding bank will output invalid data (software trap 009Bh), while every write access to the
bank will be ignored. At the end of the write operation or during a Program or Erase Suspend these
bits are automatically reset and the bank returns to read mode. After a Program or Erase Resume
these bits is automatically set again.
Flash registers access locked
When this bit is set, it means that the access to the Flash Control Registers FCR0H/-FCR1H/L,
FDR0H/L-FDR1H/L, FARH/L and FER is locked by the FPEC: any read access to the registers will
output invalid data (software trap 009Bh) and any write access will be ineffective. LOCK bit is
automatically set when the Flash bit WMS is set.
This is the only bit the user can always access to detect the status of the Flash: once it is found
low, the rest of FCR0L and all the other Flash registers are accessible by the user as well.
Note that FER content can be read when LOCK is low, but its content is updated only when also
BSYx bits are reset.
29/188
Internal Flash memoryST10F273Z4
5.4.2 Flash control register 0 high
The Flash Control Register 0 High (FCR0H) together with the Flash Control Register 0 Low
(FCR0L) is used to enable and to monitor all the write operations on the IFlash. The user
has no access in write mode to the Test-Flash (B0TF). Besides, Test-Flash block is seen by
the user in Bootstrap mode only.
FCR0H (0x0E 0002)FCRReset Value: 0000h
15 14 13 12 11109 8 7 6543210
WMS SUSPWPG DWPG SERreservedSPRSMODreserved
RWRWRWRWRWRWRW
Table 9.Flash control register 0 high
BitFunction
SMOD
SPR
SER
DWPG
This must be set before every Write Operation except for writing in the Flash Non Volatile
Protection Registers, SMOD is automatically reset at the end of the Write Operation.
Set protection
This bit must be set to select the Set Protection operation. The Set Protection operation allows to
program 0s in place of 1s in the Flash Non Volatile Protection Registers. The Flash Address in
which to program must be written in the FARH/L registers, while the Flash Data to be programmed
must be written in the FDR0H/L before starting the execution by setting bit WMS. A sequence error
is flagged by bit SEQER of FER if the address written in FARH/L is not in the range 0x0EDFB00x0EDFBF. SPR bit is automatically reset at the end of the Set Protection operation.
Sector erase
This bit must be set to select the Sector Erase operation in the Flash modules. The Sector Erase
operation allows to erase all the Flash locations to value 0xFF. From 1 to all the sectors of the
same bank (excluded Test-Flash for Bank B0) can be selected to be erased through bits BxFy of
FCR1H/L registers before starting the execution by setting bit WMS. It is not necessary to preprogram the sectors to 0x00, because this is done automatically. SER bit is automatically reset at
the end of the Sector Erase operation.
Double word program
This bit must be set to select the Double Word (64 bits) Program operation in the Flash module.
The Double Word Program operation allows to program 0s in place of 1s. The Flash Address in
which to program (aligned with even words) must be written in the FARH/L registers, while the 2
Flash Data to be programmed must be written in the FDR0H/L registers (even word) and FDR1H/L
registers (odd word) before starting the execution by setting bit WMS. DWPG bit is automatically
reset at the end of the Double Word Program operation.
Word program
This bit must be set to select the Word (32 bits) Program operation in the Flash module. The Word
WPG
30/188
Program operation allows to program 0s in place of 1s. The Flash Address to be programmed must
be written in the FARH/L registers, while the Flash Data to be programmed must be written in the
FDR0H/L registers before starting the execution by setting bit WMS. WPG bit is automatically reset
at the end of the Word Program operation.
Loading...
+ 158 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.