MC9S08LG32 MCU Series, Rev. 5
Freescale Semiconductor
306
Chapter 16
Timer/Pulse-Width Modulator (S08TPMV3)
16.1
Introduction
The TPM is a one-to-eight-channel timer system which supports traditional input capture, output compare,
or edge-aligned PWM on each channel. A control bit allows the TPM to be configured such that all
channels may be used for center-aligned PWM functions. Timing functions are based on a 16-bit counter
with prescaler and modulo features to control frequency and range (period between overflows) of the time
reference. This timing system is ideally suited for a wide range of control applications, and the
center-aligned PWM capability extends the field of application to motor control in small appliances.
shows the MC9S08LG32 series block diagram with the TPM blocks and pins highlighted.
16.1.1
TPM External Clock
The TPM modules on the MC9S08LG32 series use the TPMCLK pin.
16.1.2
Module Instances
The MC9S08LG32 series MCUs contain two TPM modules: TPM1 and TPM2. The memory map, pins,
interrupts, etc. for the two modules can be differentiated using the TPM1 and TPM2 nomenclature.
16.1.3
Module Configuration
The TPM module pins, TPMxCHn can be repositioned under software control using TPM2CH5,
TPM2CH4, TPM2CH3, TPM2CH2, TPM2CH1, TPM2CH0, TPM1CH1, and TPM1CH0 bits in PINPS2
register as shown in
. TPM2CH5, TPM2CH4, TPM2CH3, TPM2CH2, TPM2CH1, TPM2CH0,
TPM1CH1, and TPM1CH0 bits in PINPS2 register selects which general-purpose I/O ports are associated
with TPM operation.
Table 16-1. TPM Position Options
TPMxCHn
Port Pin for TPM2CH5 Port Pin for TPM2CH4 Port Pin for TPM2CH3 Port Pin for TPM2CH2
0 (default)
PTF3
PTF4
PTF5
PTF0
1
PTH6
PTH7
PTI2
PTI3
TPMxCHn
Port Pin for TPM2CH1 Port Pin for TPM2CH0 Port Pin for TPM1CH1 Port Pin for TPM1CH0
0 (default)
PTA6
PTA5
PTF2
PTF1
1
PTI4
PTI5
PTH4
PTH5
Содержание MC9S08LG16
Страница 2: ......
Страница 4: ......
Страница 8: ......
Страница 20: ......
Страница 26: ...Chapter 1 Device Overview MC9S08LG32 MCU Series Rev 5 26 Freescale Semiconductor...
Страница 40: ...Chapter 2 Pins and Connections MC9S08LG32 MCU Series Rev 5 40 Freescale Semiconductor...
Страница 96: ...Chapter 5 Resets Interrupts and General System Control MC9S08LG32 MCU Series Rev 5 96 Freescale Semiconductor...
Страница 296: ...Chapter 12 Serial Peripheral Interface S08SPIV4 MC9S08LG32 MCU Series Rev 5 296 Freescale Semiconductor...
Страница 372: ......