FXTH870xD
Sensors
68
Freescale Semiconductor, Inc.
9
Timer Pulse-Width Module
The timer pulse-width module (TPM1) is a two channel timer system that supports traditional input capture, output compare, or
edge-aligned PWM on each channel. All the features and functions of the TPM1 are as described in the MC9S08RC16 product
specification. The user has the option to connect the two timer channels to the PTA2:3 pins, if those pins are not needed for an
LFR channel or other general purpose I/O function. The following clock source and frequency selections are available using the
system option register 2 as shown in
Figure 23
and
Table 27
.
In addition one channel of the TPM1 can be connected to a 500 kHz clock (D
X
) derived from the crystal oscillator on the RFM.
This selection is made by setting the TPM1 to use an external clock. This clock source allows time calibration of the LFO as
described in the
9.1
Features
The TPM1 has the following features:
•
May be configured for buffered, center-aligned pulse-width modulation (CPWM) on all channels
•
Clock sources independently selectable
•
Selectable clock sources (device dependent): bus clock, fixed system clock
•
Clock prescaler taps for divide by 1, 2, 4, 8, 16, 32, 64, or 128
•
16-bit free-running or up/down (CPWM) count operation
•
16-bit modulus register to control counter range
•
Timer system enable
•
One interrupt per channel plus a terminal count interrupt
•
Channel features:
—
Each channel may be input capture, output compare, or buffered edge-aligned PWM
—
Rising-edge, falling-edge, or any-edge input capture trigger
—
Set, clear, or toggle output compare action
—
Selectable polarity on PWM outputs
9.2
TPM1 Configuration Information
The device provides one two-channel timer/pulse-width modulator (TPM1).
An easy way to measure the low frequency oscillator (LFO) is to connect the LFO directly to TPM1 channel 0. The LFOSEL bit
in the SOPTZ determines whether TPM1CH0 is connected to PTAZ or the LFO.
TPM1 clock source selection for the TPM1 is shown in the table below.
Table 46. TPM1 Clock Source Selection
CLKSB
CLKSA
Clock Source
0
0
No source; TPM1 disabled
0
1
BUSCLK
1
0
unused
1
1
Internal DX pin
Summary of Contents for FXTH870 D Series
Page 86: ...FXTH870xD Sensors 84 Freescale Semiconductor Inc Figure 57 Data Flow For Measurements...
Page 171: ...FXTH870xD Sensors Freescale Semiconductor Inc 169 Figure 128 QFN Case Outline...
Page 172: ...FXTH870xD Sensors 170 Freescale Semiconductor Inc Figure 129 QFN Case Outline...
Page 173: ...FXTH870xD Sensors Freescale Semiconductor Inc 171...