English
Language : 

MC9S08GB60 Datasheet, PDF (153/290 Pages) Motorola, Inc – Microcontrollers
TPM Block Diagram
10.3 TPM Block Diagram
The TPM uses one input/output (I/O) pin per channel, TPMxCHn where x is the TPM number (for
example, 1 or 2) and n is the channel number (for example, 0–4). The TPM shares its I/O pins with
general-purpose I/O port pins (refer to the Pins and Connections chapter for more information).
Figure 10-2 shows the structure of a TPM. Some MCUs include more than one TPM, with various
numbers of channels.
BUSCLK
XCLK
TPMx) EXT CLK
SYNC
CPWMS
MAIN 16-BIT COUNTER
16-BIT COMPARATOR
TPMxMODH:TPMx
CHANNEL 0
16-BIT COMPARATOR
TPMxC0VH:TPMxC0VL
16-BIT LATCH
CHANNEL 1
16-BIT COMPARATOR
TPMxC1VH:TPMxC1VL
16-BIT LATCH
CLOCK SOURCE
SELECT
OFF, BUS, XCLK, EXT
CLKSB CLKSA
COUNTER RESET
PRESCALE AND SELECT
DIVIDE BY
1, 2, 4, 8, 16, 32, 64, or 128
PS2
PS1
PS0
TOF
INTERRUPT
TOIE
LOGIC
ELS0B ELS0A
CH0F
MS0B MS0A
CH0IE
ELS1B ELS1A
CH1F
MS1B MS1A
CH1IE
PORT
LOGIC
TPMxCH0
INTERRUPT
LOGIC
PORT
LOGIC
TPMxCH1
INTERRUPT
LOGIC
CHANNEL n
16-BIT COMPARATOR
TPMxCnVH:TPMxCnVL
16-BIT LATCH
ELSnB ELSnA
CHnF
MSnB MSnA
CHnIE
PORT
LOGIC
TPMxCHn
INTERRUPT
LOGIC
Figure 10-2. TPM Block Diagram
The central component of the TPM is the 16-bit counter that can operate as a free-running counter, a
modulo counter, or an up-/down-counter when the TPM is configured for center-aligned PWM. The TPM
MC9S08GB/GT Data Sheet, Rev. 2.3
Freescale Semiconductor
153