
MPC555 / MPC556
TPU ROM FUNCTIONS
MOTOROLA
USER’S MANUAL
Rev. 15 October 2000
D-43
D.17 Read / Write Timers and Pin TPU Function (RWTPIN)
The RWTPIN TPU function enables the CPU to read both the TCR1 and TCR2 timer
counters via locations in PRAM and selectively load TCR1 or TCR2 with a CPU sup-
plied value contained in PRAM. The function also allows control of the pin state and
direction of the RWTPIN channel.
A pin state parameter is maintained in PRAM and is updated upon every service
request. It can contain a value of the current pinstate whether the pin is programmed
as an input or output.
The function also receives links, and upon receipt will read the two TCRs into PRAM,
updating the pinstate parameter. A maskable interrupt request to the CPU is
generated.
The CPU can control the channel pin, the channel pin and the TCRs, or just the TCRs.
To control the pin only, the ‘read TCR’ option is used and the values returned ignored.
Controlling the TCRs without effect on the pin allows this function to be run on a TPU
channel whose pin is being controlled by a different function running on another chan-
nel (e.g., a slave stepper motor channel). See Motorola TPU Progamming Note
Using
The TPU Function Library And TPU Emulation Mode,
(TPUPN00/D)
.
shows all of the host interface areas for the PTA function.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..