English
Language : 

MC9S08GB60A Datasheet, PDF (157/302 Pages) Freescale Semiconductor, Inc – HCS08 Microcontrollers
Timer/PWM (TPM)
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
<st-blue>
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
<st-blue> <st-blue>
COUNTER RESET
PRESCALE AND SELECT
DIVIDE BY
1, 2, 4, 8, 16, 32, 64, or 128
<st-blue> <st-blue> <st-blue>
<st-blue>
<st-blue>
INTERRUPT
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
MC9S08GB60A Data Sheet, Rev. 2
Freescale Semiconductor
157