16-bit MCU with 512 Kbyte Flash memory and 36 Kbyte RAM
Feature summary
■ High performance 16-bit CPU with DSP
functions
– 31.25ns 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)
– Programmable 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 ST10F273E device is a derivative of the STMicroelectronics ST10 family of 16-bit
single-chip CMOS microcontrollers.
The ST10F273E combines high CPU performance (up to 32 million instructions per second)
with high peripheral functionality and enhanced I/O-capabilities. It also provides on-chip
high-speed single voltage Flash memory, on-chip high-speed RAM, and clock generation
via PLL.
ST10F273E 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
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 restrictions
and functional differences due to the XBUS peculiarities are present between the classic
PWM and the new XPWM.
pin replaces DC2 of ST10F269.
DD
and consequently the internally generated V18) is turned
DD
An I2C interface on the XBUS is added (see X-I2C or simply I2C interface).
11/179
IntroductionST10F273E
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: ST10F273E 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: ST10F273E 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 8 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
refere nce t he on-c hi p main osci ll ator clo c k. Wh en th is on-c hip a mpl ifi er is us ed 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 prog ra mmab le f or input or o utput via d irection
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:
1OP6.0CS0
Chip select 0 output
...............
P6.0 - P6.7
5OP6.4CS4
IP6.5HOLD
Chip select 4 output
External master hold request input
8-bit bidirectional I /O port, bit-wise prog ra mmab le f or input or o utput via d irection
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:
I/ORxD1ASC1: Data input (Asynchronous) or I/O (Synchronous)
I/OP8.7CC23IOCAPCOM2: CC23 capture input / compare output
16
OTxD1ASC1: Clock / Data output (Asynchronous/Synchronous)
15/179
Pin dataST10F273E
Table 1.Pin description (continued)
SymbolPinTypeFunction
8-bit bidirectional I /O port, bit-wise prog ra mmab le f or input or o utput via d irection
bit. Programming an I/O pin as input forces the corresponding output driver to
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) f or the A/D co nv erter , where P5.x equa ls
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:
P5.0 - P5.9
P5.10 - P5.15
P2.0 - P2.7
P2.8 - P2.15
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
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 imped anc e st ate. Port 2 outputs can be configured as pu sh -pul l or
open drain drivers. The input threshold of Port 2 is selectable (TTL or CMOS).
The following Port 2 pins have alternate functions:
External memory high byte enable si gna l
External memory high byte write strobe
System clock output (programmable divider on CPU
clock)
17/179
Pin dataST10F273E
Table 1.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 fo rces 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
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:
P4.0 –P4.7
90OP4.5A21Segment address line
91OP4.6A22Segment address line
92OP4.7A23Most significant segment address line
RD
/WRL96O
WR
READY/
READY
95O
97I
ICAN2_RxD CAN2: receive data input
I/OSCL
I2C Interface: serial clock
ICAN1_RxD CAN1: receive data input
ICAN2_RxD CAN2: receive data input
OCAN1_TxDCAN1: transmi t data outp ut
OCAN2_TxDCAN2: transmi t data outp ut
OCAN2_TxDCAN2: transmi t data outp ut
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.
ALE98O
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/179
ST10F273EPin data
Table 1.Pin description (continued)
SymbolPinTypeFunction
External access enable pin.
A low level applied to this pin during and after Reset forces the ST10F273E to
start the program from the external memory space. A high level forces
ST10F273E to start in the internal memory space. This pin is also used (when
DD
DD
turned
EA / V
STBY
P0L.0 -P0L.7,
P0H.0
P0H.1 - P0H.7
99I
100-107,
108,
111-117
Stand-by mode is entere d, th at i s ST1 0F2 73E u nde r res et a nd m ai n V
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 fro m 4. 5 to 5.5V (6V fo r a re duc ed amount of time during t he 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 progr ammab le f or input or
output via direction bit. Programming an I/O pin as input fo rces 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) b us in multipl e xe d b us modes and as the data (D) bu s
in demultiplexed bus modes.
Two 8-bit bidirectional I/O ports P1L and P1H, bit-wise progr ammab le f or input or
output via direction bit. Programming an I/O pin as input fo rces 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:
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. Minim um an d m axi m um 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 groun d whil e XTAL4 shall be left open. Bes ides , bit OF F32
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 le v e l at this pi n f or
a specified duration while the oscillator is running resets the ST10F273E. An
RSTIN
RSTOUT
NMI
140I
141O
142I
internal pull-up resistor permits po we r-on reset usi ng only a capa citor co nnected
to VSS. In bidirectional reset mode (enabled by setting bit BDRSTEN in
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, so ftwa re or w atch dog tim er reset .
RSTOUT
remains low unti l the EINIT
(end of initialization) instruction is executed.
Non-Maskable Interrupt In put. A high to lo w tr ansition at this pin caus es the CPU
to vector to the NMI trap routin e. If bit PWDCFG = ‘0’ in SYSCON register, when
the PWRDN (power down) instruction is exe cut ed, the NMI
order to force the ST10F273E to go into power down mode. If NMI
pin must be low in
is high and
PWDCFG =’0’, when PWRDN is e x ecuted, 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 VSS pin.
20/179
ST10F273EFunctional description
3 Functional description
The architecture of the ST10F273E 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
ST10F273E.
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
Port 0
Port 1Port 4
Port 6Port 5
81615 8 8
16
16 16
16 16
XCAN2
External bus
XPWM
XASC
XSSC
controller
16
16
Interrupt controller
10-bit ADC
ASC0
GPT1 / GPT2
BRGBRG
Port 3Port 7Port 8
SSC0
PEC
PWM
CAPCOM2
Watchdog
Oscillator
32 kHz
oscillator
PLL
5V-1.8V
voltage
regulator
CAPCOM1
16
Port 2
21/179
Memory organizationST10F273E
4 Memory organization
The memory space of the ST10F273E 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
page 25
for more details on memory mapping in boot mode. The summary of address range
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/179
ST10F273EMemory 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 SY SCON 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). T w o 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 acce sses ar e po ssib l e). Two wa its tate s gi v e an acc es s tim e of 6 2. 5 ns a t 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/179
Memory organizationST10F273E
(only word accesses are possible). T w o 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). T wo w aitstates 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 ST10F273E 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/179
ST10F273EInternal 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 3.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/179
Internal Flash memoryST10F273E
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 (
or erase mode (
the first four banks are remapped into code segment 1 (same as obtained setting bit
ROMS1 in SYSCON register).
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 av oid 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 memo ry 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/179
ST10F273EInternal 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 Registers 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 t o the Test-Fla sh (B0 TF) . Besi d es, Test-Flash bloc k is seen by
the user in Bootstrap mode only.
FCR0L (0x0E 0000)FCRReset Value: 0000h
1514131211109876543210
reservedBSY1 BSY0 LOCKres.res.res.res.
RRR
Table 7.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 ignore d. At the end o f the write oper ation o r during a Prog ram or Er ase Suspe nd these
bits are automaticall y res et a nd the bank returns to read mode. Afte r a Prog ram 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/179
Internal Flash memoryST10F273E
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 t o the Test-Fla sh (B0 TF) . Besi d es, Test-Flash bloc k is seen by
the user in Bootstrap mode only.
FCR0H (0x0E 0002)FCRReset Value: 0000h
1514131211109876543210
WMS SUSPWPG DWPG SERreservedSPRSMODreserved
RWRWRWRWRWRWRW
Table 8.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 m ust be written in the FARH/L registers, while the Flas h Data to be prog ram med
must be written in the FDR0 H/L bef ore sta rting the ex ecution by set ting bit WMS. A se quence erro r
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 bit s) 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 prog ram med m us t be written in t he FD R0H/L reg isters (e v e n w ord) and FDR1 H/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 progra m
This bit must be set to select the Word (32 bits) Program opera tion in th e Flash module. The Word
WPG
30/179
Program opera tion allo ws to p rogram 0s in pl ace of 1s . The Flash Address to be prog ramm ed must
be written in the FARH/L registers, while the Flash Data to be programmed must be written in the
FDR0H/L registers be fo re starting the e x ecution b y setti ng bit WM S. WP G bit is aut omatical ly reset
at the end of the Word Program operation.
Loading...
+ 149 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.