MOTOROLA
PULSE WIDTH MODULATOR
MMC2001
15-6
REFERENCE MANUAL
1 =
PWM is enabled and begins a new period. The following events occur:
The output pin changes state to start a new period (if width != 0 and
period != 0 and width < period)
The counter is released and begins counting
The comparators are enabled
The PWM IRQ bit is set, indicating the start of a new period if IRQ EN is set.
CLK SEL — Clock Select
These bits select the output of the divider chain.
15.2.2 PWM Period Register
The PWM period register (PWMPR) controls the period of the PWM by defining the
number of PCLKs in the period. When the counter value matches the value in this
register, an interrupt is posted and the counter is reset to start another period.
Figure 15-5 PWM Period Registers
PERIOD — Pulse Period
This is the value that causes the counter to be reset. There is one special case. When
PERIOD = 0, the output is never set high (0% duty cycle). In this case, the compara-
tor is loaded and the counter reset on every PCLK. In addition, if enabled, an interrupt
request is generated on every PCLK.
Table 15-2 CLK SEL Field Settings
Value
Divide By
000
4
001
8
010
16
011
64
100
256
101
2048
110
16384
111
65536
PWMPR0 — PWM0 Period Register
10005002
PWMPR1 — PWM1 Period Register
1000500A
PWMPR2 — PWM2 Period Register
10005012
PWMPR3 — PWM3 Period Register
1000501A
PWMPR4 — PWM4 Period Register
10005022
PWMPR5 — PWM5 Period Register
1000502A
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
R
0
0
0
0
0
0
PERIOD
W
RESET:
0
0
0
0
0
0
0
0
0
0
Freescale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc.
..