5S5S6-bit input-only port with Schmitt-Trigger characteristics.
Port 5 pins also serve as timer inputs:
98I5SP5.10T6EUDGPT2 Timer T6 Ext.Up/Down
Ctrl.Input
99I5SP5.11T5EUDGPT2 Timer T5 Ext.Up/Down
Ctrl.Input
100I5SP5.12T6INGPT2 Timer T6 Count Input
1I5SP5.13T5INGPT2 Timer T5 Count Input
2I5SP5.1 4T4 EUDGPT1 Timer T4 Ex t. Up / Down
Ctrl.Input
3I5SP5.1 5T2 EUDGPT1 Timer T2 Ex t. Up / Down
Ctrl.Input
5I3TX TAL1:Input to the oscillator amplifier and internal clock
generator
6O3TXTAL2:Output of the oscillator amplifier circuit.
To clock the device from an external source, drive
XTA L1, while leaving XTAL2 unconnected.
Observe minimum and maximum high/low and
rise/fall times specified in the AC Characteristics.
Table 1 Pin definitions
5/68
1
ST10R172L - PIN DESCR IPTION
1)
Symbol
P3.0 –
P3.13
P3.15
Pin Number
(TQFP)
8-21
Input (I)
I/O
Output (O)
Kind
Function
5T 5TA 15-bit (P3.14 is missing) bidirectional I/O port. Port 3 is bit-
wise programmable for input or output via direction bits. For a
22
I/O
pin configured as input, the output driver is put into highimpedance state. Port 3 outputs can be configured as push/
pull or open drain drivers. The following pins have alternate
I/O5TAn 8-bit bidirectional I/O port. Port 8 is bit-wise programmable
for input or output via direction bits. For a pin configured as
input, the output driver is put into high-impedance state.
Port 4 can be used to output the segment address lines for
external bus configuration.
23O5TP4.0A16Least Significant Segment Addr. Line
..................
26O5TP4.3A19Segment Address Line
29O5TP4.4A20Segment Address Line
O5TSSPCE1 Chip Enable Line 1
30O5TP4.5A21Segment Address Line
O5TSSPCE0SSPChip Enable Line 0
31O5TP4.6A22Segment Address Line
I/O5TSSPDATSSP Data Input/O utpu t Line
RD
WR/
WRL
READY/
READY
32O5TP4.7A23Most Significant Segment Addr. Line
O5TSSPCLKSSP Clock Output Line
33O5TExternal Memory Read Strobe. RD is activated for every exter-
nal instruction or data read access.
34O5TExternal Memory Write Strobe. In WR-mode, this pin is acti-
vated for every external data write access. In WRL-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.
35I5TReady Input. Active level is programmable. When the Ready
function is enabled, the selected inactive level at this pin dur-
ing an external memory access will f orce t he insertion of mem-
ory cycle time waitstates until the pin returns to the selected
active level. Polarity is pro gram mable.
Table 1 Pin definitions
7/68
1
ST10R172L - PIN DESCR IPTION
1)
Symbol
Pin Number
(TQFP)
Input (I)
Output (O)
Kind
Function
ALE36O5TAddress Latch Enable Output. Can be used for latching the
address into external memory or an address latch in the multi-
plexed bus modes.
EA
37I5TE xt ernal Access Enable pin. Low level at this pin during and
after reset forces the ST10R172L to begin instruction execu-
tion out of external memory. A high level forces execution out
of the internal ROM. The ST10R172L must have this pin tied
to ‘0’.
PORT0:
P0L.0–
P0L.7,
P0H.0 -
P0H.7
41 - 48
51 - 58
I/O5TPORT0 has two 8-bit bidirectional I/O ports P0L and P0H. It is
bit-wise programmable for input or output via direction bits. For
a pin configured as input, the output driver is put into high-
impedance state.
For exter nal bus configuration, PORT0 acts as address (A)
and address/data (AD) bus in multiplexed bus modes and as
I/O5TPORT1 has two 8-bit bidirectional I/O ports P1L and P1H. It is
bit-wise programmable for input or output via direction bits. For
a pin configured as input, the output driver is put into high-
impedance state. PORT1 acts as a 16-bit address bus (A) in
demultiplexed bus modes and also after switching from a
demultiplexed bus mode to a multiplexed bus mode.
Table 1 Pin definitions
ST10R172L - PIN DESCR IPTION
1)
Symbol
Pin Number
(TQFP)
Input (I)
Output (O)
Kind
Function
RSTIN79I5TReset Input with Schmitt-Trigger characteristics. Resets the
device when a low level is applied for a specified duration while
the oscillator is running. An internal pullup resi stor enables
power-on reset using only a capacitor connected to
a bonding option, the RSTIN
pin can also be pulled-down for
V
SS
. With
512 internal clock cycles for hardware, software or watchdog
timer triggered resets
RSTOUT
80O5TInternal Reset Indication Output. This pin is set to a low level
when the part is executes hardware-, software- or watchdog
timer reset. RSTOUT
remains low until the EINIT (end of ini-
tialization) instruction is executed.
NMI
81I5SNon-Maskable Interrupt Input. A high to low transition at this
pin causes the CPU to vector to the NMI trap routine.
P6.0P6.7
If it is not used, NMI
82-89I/O5TAn 8-bit bidirectional I/O port. Port 6 is bit-wise programmable
for input or output via direction bits. For a pin configured as
should be pulled high externally.
input, the output driver is put into high-impedance state. Port 6
outputs can be configured as push/pull or open drain drivers.
The following Port 6 pins have alternate functions:
82O5TP6.0CS0
Chip Select 0 Output
..................
86O5TP6.4CS4
87I5TP 6. 5HOL D
Chip Select 4 Output
External Master Hold Request Input
(Master mode: O, Slave mode: I)
88I/O5TP6.6HLDA
89O5TP6.7BRE Q
Hold Acknowledge Output
Bus Request Output
Table 1 Pin definitions
9/68
1
ST10R172L - PIN DESCR IPTION
1)
Symbol
P2.8 –
P2.11
Pin Number
(TQFP)
Input (I)
Output (O)
Kind
Function
90 - 93I/O5TPor t 2 is a 4-bit bidirectional I/O port. It is bit-wise programma-
ble for input or output via di rection bits. For a pin configured as
input, the output driver is put into high-impedance state. Port 2
outputs can be configured as push/pull or open drain drivers.
The following Port 2 pins have alternate functions:
90I5TP 2.8EX0INFast External Interrupt 0 Input
..................
93I5TP 2.11EX 3INFast Externa l Interrupt 3 Input
P7.0 –
P7.3
94 - 97I/O5TPor t 7 is a 4-bit bidirectional I/O port. It is bit-wise programma-
ble for input or output via di rection bits. For a pin configured as
input, the output driver is put into high-impedance state. Port
7outputs can be configured as push/pull or open drain drivers.
The following Port 7 pins have alternate functions:
97O5TP7.3POUT3PWM (Channel 3) Output
RPD40I/O5TInput timing pin for the return from powerdown circuit and
power-up asynchronous reset.
V
DD
7, 28,
-PODi gital supply voltage.
38, 49,
69, 78
V
SS
4, 27,
-PODi gital ground.
39, 50,
70, 77
Table 1 Pin definitions
1) The following I/O kinds are used. Refer to
page 31 for a detailed description.
PO: Power pin
3T: 3 V tolerant pin (voltage max. respect to Vss is -0.5 to VDD + 0.5)
5V: 5 V tolerant pin (voltage max. respect to Vss is -0.5 to 5.5 only if chip is powered)
5S: 5 V tolerant and f ail-safe pin (-0.5-5.5 ma x. voltage w.r.t. Vss ev en if chip is n ot pow-
ered).
10/68
1
ELECTRICAL CHARACTERISTICS
on
ST10R172L - FUNCTIONAL DESCRIPTION
2FUNCTIONAL DESCRIPTION
ST10R172L architecture combines the advantages of both RISC and CISC processors wi th
an advanced peripheral subsystem. The following block diagram overviews the different onchip components and the internal bus structure.
The ST10R172L is a ROMless device, the internal RAM space is 1 KByte. The RAM address
space is used for variables, register banks, the system stack, the PEC pointers (in 00’FCE0h
- 00’FCFFh) and the bit-addressable space (in 00’FD00h - 00’FDFFh).
00’EFFFh
256 Byte
00’EF00h
00’1FFFh
8K-byte
00’0000h
RAM/SFR
XSSP
External
memory
internal
memory
System Segment 0
64 K-Byte
00’FFFFh
00’F000h
Data Page 3
00’F000h
Data Page 2
00’8000h
Data Page 1
Block 1
00’4000h
Data Page 0
Block 0
00’0000h
00’FF3Fh
00’FF20h
00’FE3Fh
00’FE20h
00’FF3Fh
00’FF20h
00’F03Fh
00’F020h
SFR Area
(reserved)
RAM
ESFR Area
(reserved)
DPRAM / SFR Area
4 K-Byte
00’FFFFh
00’FE00h
1K-Byte
00’FA00h
00’F200h
00’F000h
12/68
1
Figure 3 Memory map
ST10R172L - CENTRAL PROCESSING UNIT
4CENTRAL PROCESSING UNIT
The main core of the CPU contains a 4-stage instruction pipeline, a separate multiply and
divide unit, a bit-mask generator and a barrel shifter . Most instructions can be ex ecuted in one
machine cycle requiring 40ns at 50MHz CPU clock.
The CPU includes an actual register context consisting of 16 wordwide GPRs physically
located in the on-chip RAM area. A Context Pointer (CP) register determines the base
address of the activ e register bank to be ac cessed b y the CPU . T he number of r egister banks
is only restricted by the available internal RAM space. For easy parameter passing, one
register bank may overlap others.
A system stack of up to 1024 bytes is provided as a storage for temporary data. The system
stack is al located in the on-chip RAM area, and it i s accessed by the C PU via the stac k pointer
(SP) register. Two separate SFR s, STKOV and STKUN, are compared against the stack
pointer value during each stack access to detect stack overflow or underflow.
SP
STKOV
STKUN
Exec. Unit
Instr. Ptr
Instr. Reg
4-Stage
Pipeline
PSW
SYSCON
BUSCON 0
BUSCON 1
BUSCON 2
BUSCON 3
BUSCON 4
Data Pg. Ptrs
CPU
MDH
MDL
Mul./Div.-HW
Bit-Mask Gen.
ALU
16-Bit
Barrel-Shift
Context Ptr
ADDRSEL 1
ADDRSEL 2
ADDRSEL 3
ADDRSEL 4
Code Seg. Ptr.
R15
General
Purpose
Registers
R0
IDX0
QR0
IDX1
QX1QX0
QR1
Figure 4 CPU block diagram
16
16
Internal
RAM
1KByte
R15
R0
13/68
1
ST10R172L - INTERRUPT AND TRAP FUNCTIONS
5INTERRUPT AND TRAP FUNCTI ONS
The architecture of the ST10R172L supports s everal mechanisms for fast and flexible
response to the service requests that can be generated from various sources, internal or
external to the microcontroller. Any of these interrupt requests can be programmed to be
serviced, either by the Interrupt Controller or by the Peripheral Event Controller (PEC).
In a standard interrupt service, program executi on is suspended and a branch to the interrupt
service routine is performed. For a PEC service, just one cycle is ‘stolen’ from the current
CPU activity. A PEC service is a single, byte or word data transfer between any two memory
locations, with an additional increment of either the PEC source or the destination pointer. An
individual PEC transfer counter is decremented for each PEC servic e, except in the
continuous transfer mode. When this counter reaches zero , a standard interrupt is performed
to the corresponding source-related vector location. PEC services are very well suited, for
example, to the transmission or reception of blocks of data. The ST10R172L has 8 PEC
channels, each of which offers fast interrupt-driven data transfer capabilities.
A separate control register which contains an interrupt request flag, an interrupt enable flag
and an interrupt priority bitfield, exists f or each of the possib le interrupt sources. Via it s related
register, each source can be programmed to one of sixteen interrupt priority levels. Once
having been accepted by the CPU, an interrupt service can only be interrupted by a higher
priority service request. For standard interrupt processing, each of the possible interrupt
sources has a dedicated vector location.
Fast external interrupt inputs are provided to service external interrupts with high precision
requirements. These fast interrupt inputs, feature programmable edge detection (rising edge,
falling edge or both edges).
Software interrupts are supported by means of the ‘TRAP’ instruc tion in combination with an
individual trap (interrupt) number.
Table 2 List of possible interrupt sources, flags, vector and trap numbers
15/68
1
ST10R172L - INTERRUPT AND TRAP FUNCTIONS
5.2 Hard w are traps
Exceptions or error conditions that arise during run-time are called Hardware T raps. Hardware
traps cause immediate non-maskable system reaction similar to a standard interrupt service
(branching to a dedicated vector table location). The occurrence of a hardware trap is
additionally signified by an individual bit in the trap flag register (TFR). Except when another
higher prioritized trap service is in progress, a hardware trap will interrupt any actual progr am
ex ecution. In turn, hardware trap services can not normally be interrupted by standard or PEC
interrupts. The following tab le shows all of the possible ex ceptions or error conditions that can
arise during run-time:
The ST10R172L provides up to 77 I/O lines organized into 7 input/output ports and one input
port. All port lines are bit-addressable, and all input/output lines are individually (bit-wise)
programmable as inputs or outputs by direction registers. The I/O ports are true bi directional
ports which are switched to high impedance state when configured as inputs. The output
drivers of three I/O ports can be configured (pin by pin) for push/pull operation or open-drain
operation by control registers. During the internal reset, all port pins are configured as inputs.
All port lines have programmable alternate input or output functions associated with them.
PORT0 and PORT1 may be used as address and data lines when accessing external
memory , while P ort 4 outputs the additional segment address bits A23/19/17...A16 in systems
where segmentation is enabled to access more than 64 KBytes of memory. Port 6 provides
optional bus arbitration signals (BREQ
alternate functions of timers, serial interfaces, the optional bus control signal BHE
system clock output (CLKOUT). Port 5 is used for timer control signals. Port 2 lines can be
used as fast external interrupt lines. Port 7 includes alternate function for the PWM signal. All
port lines that are not used for these alternate functions may be used as general purpose I/O
lines.
, HLDA, HOLD) and chip select signals. Port 3 includes
and the
7EXTE RNAL BUS CONTROLLER
All external memory accesses are performed by the on-chip External B us Controller which
can be programmed either to single chip mode when no external memory is required, or to the
following external memor y ac ces s modes:
In the demultiplex ed b us modes, addresses are output on PORT1 and data is input/output on
PORT0/P0L, respectively. In the multiplex ed bus modes both addresses and data use PORT0
for input/output.
Memory cycle time, memory tri-state time, length of ALE and read write delay are
programmable so that a wide range of different memory types and external peripherals can be
used. Up to 4 independent address windows can be defined (via ADDRSELx / BUSCONx
register pairs) to access different resources with different bus characteristics. These address
windows are arranged hier archically where BUSCON4 ov errides BUSCON3 etc. All accesses
to locations not covered by these 4 address windows are controlled by BUSCON0. Up to 5
exte r nal CS
Access to very slow memories is supported by the READY function.
signals (4 windows plus default) can be generated to reduce external glue logic.
A HOLD
/HLDA protocol is available for bus arbitration so that external resources can be
shared with other bu s masters. In slav e mode, the s lave controller can be connec ted to another master controller without glue logic. For applications which require less than 16 MBytes
17/68
1
ST10R172L - PWM MODULE
of external memory space, the address space can be restricted to 1 MByte, 256 KByte or to 64
KByte.
8PWM MODULE
A 1-channel Pulse Width Modulation (PWM) Module operates on channel 3. The pulse width
modulation module can generate up to four PWM output signals using edge-aligned or centrealigned PWM. In addition, the PWM module can generate PWM burst signals and single shot
outputs. The table below shows the PWM frequencies for different resolutions. The level of
the output signals is selectable and the PWM module can generate interrupt requests.
Mode 0
edge aligned
CPU clock/120ns195.3 KHz48.83KHz12.21KHz3.052KHz762.9Hz
CPU clock/641.28ns3.052KHz762.9Hz190.7Hz47.68Hz11.92Hz
Mode 1
center aligned
CPU clock/120ns97.66KHz24.41KHz6.104KHz1.525KHz381.5Hz
CPU clock/641.28ns1.525Hz381.5 Hz95.37Hz23.84Hz0Hz
Resolution8-bit10-bit12-bit14-bit16-bit
Resolution8-bit10-bit12-bit14-bit16-bit
Table 4 PWM unit frequencies and resolution at 50MHz CPU clock
18/68
1
ST10R172L - GENERAL PURPOSE TIMERS
9GEN ERAL PURPOSE TIM ERS
The GPTs are flexible multifunctional timer/counters used f or time-related tasks such as e vent
timing and counting, pulse width and duty cycle measurements, pulse generation or pulse
multiplication. The GPT unit contains five 16-bit timers, organized in two separate modules,
GPT1 and GPT2. Each timer in each module m ay operate independently in a number of
different modes, or may be concatenated with another timer of the same module.
9.1 GPT1
Each of the three timers T2, T3, T4 of the GPT1 module can be configured individually f or one
of four basic modes of operation: timer, gated timer, counter mode and incremental interface mode. In timer mode, the input clock for a timer is derived from the CPU clock,
divided by a programmable prescaler. In counter mode, the timer is clocked in reference to
external events. Pulse width or duty cycle measurement is supported in gated timer mode
where the operation of a timer is controlled by the ‘gate’ level on an external input pin. For
these purposes, each timer has one associated port pin (TxIN) which serves as gate or clock
input. Table 5 GPT1 timer input frequencies, resolution and periods lists the timer input
frequencies, resoluti on and periods f or eac h pre-s caler option at 50MHz CPU cl oc k. T his al so
applies to the Gated Timer Mode of T3 and to the auxiliary timers T2 and T4 in Timer and
Gated Timer Mode
The count direction (up/down) for each timer is programmable by software or may additionally
be altered dynamically by an external signal on a port pin (TxEUD).
In Incremental Interface Mode, the GPT1 timers (T2, T3, T4) can be directly connected to the
incremental position sensor signals A and B by their respective inputs TxIN and TxEUD.
Direction and count signals are internally derived from these two input signals so that the
contents of the respective timer Tx corresponds to the sensor position. The third position
sensor signal TOP0 can be connected to an interrupt input.
Timer T3 has output toggle latches (TxOTL) which changes state on each timer over-flow/
underflow. The state of this latch may be output on port pins (TxOUT) e. g. for time out
monitoring of external hardware components, or ma y be used internally to clock timers T2 and
T4 for measuring long time periods with high resolution.
In addition to their basic operating modes, timers T2 and T4 may be configured as reload or
capture registers f or timer T3. When used as capture or reload registers, timers T2 and T4 are
stopped. The contents of timer T3 is captured into T2 or T4 in response to a signal at their
associated input pins (TxIN). Timer T3 is reloaded with the contents of T2 or T4 triggered
either by an ex ternal signal or by a selectabl e state transiti on of its toggle latch T3O TL. When
both T2 and T4 are configured to alternately reload T3 on opposite state tr ansitions of T 3O T L
with the low and high times of a PWM signal, this signal can be constantly generated without
software intervention.
19/68
1
ST10R172L - GENERAL PURPOSE TIMERS
Timer input selection
F
=50MHz
CPU
000b001b010b011b100b101b110b111b
Prescaler
81632641282565121024
Factor
Input
Frequency
6.25 MHz 3.125
MHz
1.5625
MHz
781
KHz
391
KHz
195
KHz
97.5
KHz
48.83
KHz
Resolution160ns320ns640ns1.28 us 2. 56 us5.12 us10.24 us 20.48 us
Period10.49ms20 .97 ms41 .94 ms83 .88ms168ms336m s672ms1. 342s
Table 5 GPT1 timer input frequencies, resolution and periods
T2EUD
CPU Clock
T2IN
CPU Clock
T3EUD
T3IN
T4IN
CPU Clock
T4EUD
2n n= 3 ...10
n
n= 3 ...10
2
n
n= 3 ...10
2
T2
Mode
T3
Mode
T4
Mode
GPT1 Timer T2
Reload
Capture
GPT1 Timer T3
U/D
Capture
Reload
GPT1 Timer T4
U/D
Interrupt
Request
T3OUT
T3OTL
Interrupt
Request
Interrupt
Request
U/D
20/68
1
Figure 5 GPT1 block diagram
ST10R172L - GENERAL PURPOSE TIMERS
9.2 GPT2
The GPT2 module provides precise event control and time measurement. It includes two
timers (T5, T6) and a capture/reload register (CAPREL). Both timers can be clocked with an
input clock derived from the CPU clock via a programmable prescaler or with e xternal signals.
The count direction (up/down) for each timer is programmable by software or altered
dynamically by an exter nal signal on a port pin (TxEUD). Concatenation of the timers is
supported by the output toggle latch (T6OTL) of timer T6, which changes its state on each
timer overflow/underflow.
The state of T6OT L may be used to cloc k timer T5, or ma y be output on a port pin T6OUT. The
overflow s/underflows of timer T6 reload the CAPREL register. The CAPREL register captures
the contents of T5 based on an external signal transition on the corresponding port pin
(CAPIN), and timer T5 may optionally be cleared after the capture procedure. This allows
absolute time differences to be measured or pulse multiplication to be performedwithout
software overhead.
Timer input selection
F
=50MHz
CPU
000b001b010b011b100b101b110b111b
Prescaler
Factor
Input
Frequency
Resolution80ns160 ns320ns640ns1.28 us 2.56 us5.12 us10.24 us
Period5.24ms10.49ms20.97ms41.94ms8 3.88 ms167.7ms335.5m s671m s
48163264128256512
12.5 MHz 6.25 MHz 3.125
MHz
1.563
MHz
781
KHz
391
KHz
195
KHz
97.6
KHz
Table 6 GPT2 timer input frequencies, resolution and periods
21/68
1
Loading...
+ 47 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.