TIME PROCESSOR UNIT
MC68332
7-8
USER’S MANUAL
Up to 15 position-synchronized pulse generator function channels can operate with a
single input reference channel executing a PMA or PMM input function. The input
channel measures and stores the time period between the flywheel teeth and resets
TCR2 when the engine reaches a reference position. The output channel uses the pe-
riod calculated by the input channel to project output transitions at specific engine de-
grees. Because the flywheel teeth might be 30 or more degrees apart, a fractional
multiplication operation resolves down to the desired degrees. Two modes of opera-
tion allow pulse length to be determined either by angular position or by time.
7.4.9 Stepper Motor (SM)
The stepper motor control algorithm provides for linear acceleration and deceleration
control of a stepper motor with a programmable number of step rates of up to 14. Any
group of channels, up to eight, can be programmed to generate the control logic nec-
essary to drive a stepper motor.
The time period between steps (P) is defined as:
where r is the current step rate (1–14), and K1 and K2 are supplied as parameters.
After providing the desired step position in a 16-bit parameter, the CPU issues a step
request. Next, the TPU steps the motor to the desired position through an acceleration/
deceleration profile defined by parameters. The parameter indicating the desired po-
sition can be changed by the CPU while the TPU is stepping the motor. This algorithm
changes the control state every time a new step command is received.
A 16-bit parameter initialized by the CPU for each channel defines the output state of
the associated pin. The bit pattern written by the CPU defines the method of stepping,
such as full stepping or half stepping. With each transition, the 16-bit parameter rotates
one bit. The period of each transition is defined by the programmed step rate.
7.4.10 Period/Pulse-Width Accumulator (PPWA)
The period/pulse-width accumulator algorithm accumulates a 16-bit or 24-bit sum of
either the period or the pulse width of an input signal over a programmable number of
periods or pulses (from 1 to 255). After an accumulation period, the algorithm can gen-
erate a link to a sequential block of up to eight channels. The user specifies a starting
channel of the block and number of channels within the block. Generation of links de-
pends on the mode of operation. Any channel can be used to measure an accumulat-
ed number of periods of an input signal. A maximum of 24 bits can be used for the
accumulation parameter. From 1 to 255 period measurements can be made and
summed with the previous measurement(s) before the TPU interrupts the CPU, allow-
ing instantaneous or average frequency measurement, and the latest complete accu-
mulation (over the programmed number of periods).
The pulse width (high-time portion) of an input signal can be measured (up to 24 bits)
and added to a previous measurement over a programmable number of periods (1 to
255). This provides an instantaneous or average pulse-width measurement capability,
P r
( )
K1 K2 r
×
–
=
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
.
..