Time Processor Unit 3
MPC561/MPC563 Reference Manual, Rev. 1.2
19-2
Freescale Semiconductor
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 described in
Appendix D, “TPU3 ROM Functions
.”
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 multiple service requests are received simultaneously, a
priority-scheduling mechanism grants service based on channel number and assigned priority.
Summary of Contents for MPC561
Page 84: ...MPC561 MPC563 Reference Manual Rev 1 2 lxxxiv Freescale Semiconductor...
Page 144: ...Signal Descriptions MPC561 MPC563 Reference Manual Rev 1 2 2 46 Freescale Semiconductor...
Page 206: ...Central Processing Unit MPC561 MPC563 Reference Manual Rev 1 2 3 62 Freescale Semiconductor...
Page 302: ...Reset MPC561 MPC563 Reference Manual Rev 1 2 7 14 Freescale Semiconductor...
Page 854: ...Time Processor Unit 3 MPC561 MPC563 Reference Manual Rev 1 2 19 24 Freescale Semiconductor...
Page 968: ...Development Support MPC561 MPC563 Reference Manual Rev 1 2 23 54 Freescale Semiconductor...
Page 1144: ...Internal Memory Map MPC561 MPC563 Reference Manual Rev 1 2 B 34 Freescale Semiconductor...
Page 1212: ...TPU3 ROM Functions MPC561 MPC563 Reference Manual Rev 1 2 D 60 Freescale Semiconductor...
Page 1216: ...Memory Access Timing MPC561 MPC563 Reference Manual Rev 1 2 E 4 Freescale Semiconductor...