![Freescale Semiconductor ColdFire MCF5211 Reference Manual Download Page 428](http://html1.mh-extra.com/html/freescale-semiconductor/coldfire-mcf5211/coldfire-mcf5211_reference-manual_2330619428.webp)
Pulse-Width Modulation (PWM) Module
MCF5213 ColdFire® Integrated Microcontroller Reference Manual, Rev. 3
24-12
Freescale Semiconductor
24.3
Functional Description
24.3.1
PWM Clock Select
There are four available clocks—clock A, B, SA (scaled A), and SB (scaled B)—all based on the internal
bus clock.
Clock A and B can be programmed to run at 1, 1/2,..., 1/128 times the internal bus clock. Clock SA and
SB use clock A and B respectively as an input and divides it further with a reloadable counter. The rates
available for clock SA and SB are programmable to run at clock A and B divided by 2, 4,..., or 512. Each
PWM channel has the capability of selecting one of two clocks, the prescaled clock (clock A or B) or the
scaled clock (clock SA or SB). The block diagram in
shows the four different clocks and how
the scaled clocks are created.
Table 24-13. PWMSDN Field Descriptions
Field
Description
7
IF
PWM interrupt flag. Any change in state of PWM7IN is flagged by setting this bit. The flag is cleared by writing a ‘1’
to it. Writing ‘0’ has no effect.
0 No change in PWM7IN input
1 Change in PWM7IN input
6
IE
PWM interrupt enable. An interrupt is triggered to the device’s interrupt controller when PWMSDN[IF] is set.
0 Interrupt is disabled
1 Interrupt is enabled
5
RESTART
PWM restart. After setting the RESTART bit, the PWM channels start running after the corresponding counter resets
to zero. Also, if emergency shutdown is cleared (after being set), the PWM outputs restart after the corresponding
counter resets to zero. This bit is self-clearing, so is always read as zero.
4
LVL
PWM shutdown output level. Describes the behavior of the PWM outputs when PWM7IN input is asserted and
PWMSDN[SDNEN] is set.
0 PWM outputs are forced to logic 0
1 PWM outputs are forced to logic 1
3
Reserved, should be cleared.
2
PWM7IN
PWM channel 7 input status. Reflects the current status of the PWMOUT7 pin. Read only.
1
PWM7IL
PWM channel 7 input polarity. If PWMSDN[SDNEN] is set, this bit sets the active level of the PWM 7 channel
0 PWM 7 input is active low
1 PWN 7 input is active high
0
SDNEN
PWM emergency shutdown enable. If set, the pin associated with PWM channel 7 is forced to input and the
emergency shutdown feature is enabled.
0 Emergency shutdown is disabled
1 Emergency shutdown is enabled