MCU Timer/PWM (TPM Module)
MC1321x Reference Manual, Rev. 1.6
Freescale Semiconductor
17-9
•
When the channel is configured for center-aligned PWM, the timer count matches the channel
value register twice during each PWM cycle. In this CPWM case, the channel flag is set at the start
and at the end of the active duty cycle, which are the times when the timer counter matches the
channel value register.
The flag is cleared by the 2-step sequence described in
Section 17.5.1, “Clearing Timer Interrupt Flags”
17.6
TPM Registers and Control Bits
The TPM includes:
•
An 8-bit status and control register (TPM1SC)
•
A 16-bit counter (TPM1CNTH:TPM1CNTL)
•
A 16-bit modulo register (TPM1MODH:TPM1MODL)
Each timer channel has:
•
An 8-bit status and control register (TPM1CnSC)
•
A 16-bit channel value register (TPM1CnVH:TPM1CnVL)
Refer to the direct-page register summary in
for the absolute address
assignments for all TPM registers. This section refers to registers and control bits only by their names. A
Freescale-provided equate or header file is used to translate these names into the appropriate absolute
addresses.
The MC1321x has two TPMs, so register names include placeholder characters to identify which TPM and
which channel is being referenced. For example, TPMxCnSC refers to timer (TPM) x, channel n and
TPM1C2SC is the status and control register for timer 1, channel 2.
17.6.1
Timer x Status and Control Register (TPM1SC)
TPM1SC contains the overflow status flag and control bits that are used to configure the interrupt enable,
TPM configuration, clock source, and prescale divisor. These controls relate to all channels within this
timer module.
7
6
5
4
3
2
1
0
R
TOF
TOIE
CPWMS
CLKSB
CLKSA
PS2
PS1
PS0
W
Reset
0
0
0
0
0
0
0
0
= Unimplemented or Reserved
Figure 17-4. Timer x
Status and Control Register (TPM1SC)
Содержание freescale semiconductor MC13211
Страница 40: ...MC1321x Pins and Connections MC1321x Reference Manual Rev 1 6 2 6 Freescale Semiconductor...
Страница 100: ...MC1321x Serial Peripheral Interface SPI MC1321x Reference Manual Rev 1 6 4 24 Freescale Semiconductor...
Страница 166: ...Modem Modes of Operation MC1321x Reference Manual Rev 1 6 7 22 Freescale Semiconductor...
Страница 172: ...Modem Interrupt Description MC1321x Reference Manual Rev 1 6 8 6 Freescale Semiconductor...
Страница 186: ...MCU Modes of Operation MC1321x Reference Manual Rev 1 6 10 8 Freescale Semiconductor...
Страница 208: ...MCU Memory MC1321x Reference Manual Rev 1 6 11 22 Freescale Semiconductor...
Страница 244: ...MCU Parallel Input Output MC1321x Reference Manual Rev 1 6 13 20 Freescale Semiconductor...
Страница 288: ...MCU Central Processor Unit CPU MC1321x Reference Manual Rev 1 6 15 20 Freescale Semiconductor...
Страница 308: ...MCU Timer PWM TPM Module MC1321x Reference Manual Rev 1 6 17 16 Freescale Semiconductor...
Страница 338: ...Inter Integrated Circuit IIC MC1321x Reference Manual Rev 1 6 19 14 Freescale Semiconductor...
Страница 372: ...Development Support MC1321x Reference Manual Rev 1 6 21 20 Freescale Semiconductor...