![Freescale Semiconductor ColdFire MCF5211 Reference Manual Download Page 418](http://html1.mh-extra.com/html/freescale-semiconductor/coldfire-mcf5211/coldfire-mcf5211_reference-manual_2330619418.webp)
Pulse-Width Modulation (PWM) Module
MCF5213 ColdFire® Integrated Microcontroller Reference Manual, Rev. 3
24-2
Freescale Semiconductor
Main features include the following:
•
Double-buffered period and duty cycle
•
Left- or center-aligned outputs
•
Eight independent PWM modules. Notice that only the four odd PWM channel outputs are
available on the device. The even channels can be used for concatenation purposes to generate
16-bit PWM for the odd channels.
•
Byte-wide registers provide programmable duty cycle and period control
•
Four programmable clock sources
NOTE
The GPIO module must be configured to enable the peripheral function of
the appropriate pins (refer to
”
) prior to configuring the PWM module.
24.2
Memory Map/Register Definition
This section describes the registers and control bits in the PWM module. There are eight independent
PWM modules, each with its own control and counter registers, although only four channels have an
output signal. The memory map for the PWM is shown below.
Table 24-1. PWM Memory Map
IPSBAR Offset
1,2
1
Addresses not assigned to a register and undefined register bits are reserved for expansion. Write accesses to these
reserved address spaces and reserved register bits have no effect.
2
A 32-bit access to any of these registers results in a bus transfer error.
Register
Width
(bits)
Access
Reset Value
Section/Page
0x1B_0000
PWM Enable Register (PWME)
8
R/W
0x00
0x1B_0001
PWM Polarity Register (PWMPOL)
8
R/W
0x00
0x1B_0002
PWM Clock Select Register (PWMCLK)
8
R/W
0x00
0x1B_0003
PWM Prescale Clock Select Register (PWMPRCLK)
8
R/W
0x00
0x1B_0004
PWM Center Align Enable Register (PWMCAE)
8
R/W
0x00
0x1B_0005
PWM Control Register (PWMCTL)
8
R/W
0x00
0x1B_0008
PWM Scale A Register (PWMSCLA)
8
R/W
0x00
0x1B_0009
PWM Scale B Register (PWMSCLB)
8
R/W
0x00
0x1
n
n
= 0–7
PWM Channel
n
Counter Register (PWMCNT
n
)
8
R/W
0x00
0x1
n
n
= 0–7
PWM Channel
n
Period Register (PWMPER
n
)
8
R/W
0xFF
0x1
n
n
= 0–7
PWM Channel
n
Duty Register (PWMDTY
n
)
8
R/W
0xFF
0x1B_0024
PWM Shutdown Register (PWMSDN)
8
R/W
0x00