19-2
MPC561/MPC563 Reference Manual
MOTOROLA
Overview
19.1 Overview
The TPU3 can be viewed as a special-purpose microcomputer that performs a
programmable series of two operations, match and capture. Each occurrence of either
operation is called an event. A programmed series of events is called a function. TPU
functions replace software functions that would require CPU interrupt service.
The microcode ROM TPU3 functions that are available in the MPC561/MPC563 are
19.2 TPU3 Components
The TPU3 consists of two 16-bit time bases, 16 independent timer channels, a task
scheduler, a microengine, and a host interface. In addition, a dual-ported parameter RAM
(DPTRAM) is used to pass parameters between the module and the CPU.
19.2.1
Time Bases
Two 16-bit counters provide reference time bases for all output-compare and input-capture
events. Prescalers for both time bases are controlled by the CPU via bit fields in the TPU3
module configuration register (TPUMCR) and TPU module configuration register two
(TPUMCR2). Timer count registers TCR1 and TCR2 provide access to the current counter
values. TCR1 and TCR2 can be read by TPU microcode but are not directly available to the
CPU. The TCR1 clock is always derived from the system clock. The TCR2 clock can be
derived from the system clock or from an external input via theT2CLK clock pin. The
duration between active edges on the T2CLK clock pin must be at least nine system clocks.
19.2.2
Timer Channels
The TPU3 has 16 independent channels, each connected to an MCU pin. The channels have
identical hardware and are functionally equivalent in operation. Each channel consists of
an event register and pin control logic. The event register contains a 16-bit capture register,
a 16-bit compare/match register, and a 16-bit greater-than-or-equal-to comparator. The
direction of each pin, either output or input, is determined by the TPU microengine. Each
channel can either use the same time base for match and capture, or can use one time base
for match and the other for capture.
19.2.3
Scheduler
When a service request is received, the scheduler determines which TPU3 channel is
serviced by the microengine. A channel can request service for one of four reasons: for host
service, for a link to another channel, for a match event, or for a capture event. The host
system assigns each active channel one of three priorities: high, middle, or low. When