Pulse-Width Modulation (PWM) Module
MCF52277 Reference Manual, Rev. 1
Freescale Semiconductor
24-17
24.3.2.5
Left-Aligned Outputs
The PWM timer provides the choice of two types of outputs: left- or center-aligned. They are selected with
the PWMCAE[CAE
n
] bits. If the CAE
n
bit is cleared, the corresponding PWM output is left-aligned.
In left-aligned output mode, the 8-bit counter is configured as an up counter only. It compares to two
registers, a duty register and a period register, as shown in the block diagram in
PWM counter matches the duty register, the output flip-flop changes state causing the PWM waveform to
also change state. A match between the PWM counter and the period register resets the counter and the
output flip-flop, as shown in
, as well as performing a load from the double buffer period and
duty register to the associated registers, as described in
. The counter counts from 0 to the
value in the period register minus 1.
NOTE
Changing the PWM output mode from left-aligned to center-aligned output
(or vice versa) while channels are operating can cause irregularities in the
PWM output. It is recommended to program the output mode before
enabling the PWM channel.
Figure 24-16. PWM Left-Aligned Output Waveform
To calculate the output frequency in left-aligned output mode for a particular channel, take the selected
clock source frequency for the channel (A, B, SA, or SB) and divide it by the value in the period register
for that channel.
Eqn. 24-7
The PWM
n
duty cycle (high time as a percentage of period) is expressed as:
Eqn. 24-8
24.3.2.5.1
Left-Aligned Output Example
As an example of a left-aligned output, consider the following case:
Clock source = internal bus clock, where internal bus clock = 83.3 MHz (12 ns period)
PPOL
n
= 0, PWMPER
n
= 4, PWMDTY
n
= 1
PWM
n
frequency = 83.3 MHz
÷
4 = 20.8 MHz
PWM
n
period = 48 ns
The output waveform generated is below:
PWMDTY
n
Period = PWMPER
n
PPOL
n
= 0
PPOL
n
= 1
PWM
n
frequency
Clock (A, B, SA, or SB)
PWMPER
n
----------------------------------------------------------
=
Duty Cycle
1 PWMPOL PPOL
n
[
]
PWMDTY
n
PWMPER
n
-------------------------------
–
–
⎝
⎠
⎛
⎞
100%
×
=
PWMn Duty Cycle
1
1
4
---
–
⎝
⎠
⎛
⎞
100% 75%
=
×
=
Содержание MCF52277
Страница 1: ...MCF52277 Reference Manual Devices Supported MCF52274 MCF52277 Document Number MCF52277RM Rev 1 04 2008...
Страница 22: ...MCF52277 Reference Manual Rev 1 Freescale Semiconductor xxii...
Страница 32: ...MCF52277 Reference Manual Rev 0 xxxii Freescale Semiconductor...
Страница 60: ...Signal Descriptions MCF52277 Reference Manual Rev 1 2 16 Freescale Semiconductor...
Страница 112: ...Enhanced Multiply Accumulate Unit EMAC MCF52277 Reference Manual Rev 1 4 20 Freescale Semiconductor...
Страница 128: ...Static RAM SRAM MCF52277 Reference Manual Rev 1 6 6 Freescale Semiconductor...
Страница 140: ...Clock Module MCF52277 Reference Manual Rev 1 7 12 Freescale Semiconductor...
Страница 172: ...Chip Configuration Module CCM MCF52277 Reference Manual Rev 1 9 16 Freescale Semiconductor...
Страница 180: ...Serial Boot Facility SBF MCF52277 Reference Manual Rev 1 10 8 Freescale Semiconductor...
Страница 188: ...Reset Controller Module MCF52277 Reference Manual Rev 1 11 8 Freescale Semiconductor...
Страница 210: ...Crossbar Switch XBS MCF52277 Reference Manual Rev 1 13 8 Freescale Semiconductor...
Страница 480: ...Liquid Crystal Display Controller LCDC MCF52277 Reference Manual Rev 1 21 44 Freescale Semiconductor...
Страница 510: ...Touchscreen Controller Analog to Digital Converter MCF52277 Reference Manual Rev 1 22 30 Freescale Semiconductor...
Страница 542: ...FlexCAN MCF52277 Reference Manual Rev 1 23 32 Freescale Semiconductor...
Страница 568: ...Pulse Width Modulation PWM Module MCF52277 Reference Manual Rev 1 24 26 Freescale Semiconductor...
Страница 640: ...Programmable Interrupt Timers PIT0 PIT1 MCF52277 Reference Manual Rev 1 27 8 Freescale Semiconductor...
Страница 690: ...DMA Serial Peripheral Interface DSPI MCF52277 Reference Manual Rev 1 29 40 Freescale Semiconductor...
Страница 724: ...UART Modules MCF52277 Reference Manual Rev 1 30 34 Freescale Semiconductor...
Страница 740: ...I2 C Interface MCF52277 Reference Manual Rev 1 31 16 Freescale Semiconductor...
Страница 790: ...Debug Module MCF52277 Reference Manual Rev 1 32 50 Freescale Semiconductor...