
MOTOROLA
9-2
CTM
REFERENCE
PULSE WIDTH MODULATION SUBMODULE
For More Information On This Product,
Go to: www.freescale.com
9
9.2
PWMSM description
The PWMSM allows pulse width modulated signals to be generated over a wide range of
frequencies, independently of other CTM output signals. The output pulse width can vary from 0%
to 100%, with 16 bits of resolution. The minimum pulse width is twice the minimum MCU system
clock period (i.e., the minimum pulse width is 119 ns when using a 16.78 MHz clock).
The PWMSM is composed of:
–
–
–
–
–
–
–
–
–
–
–
an output flip-flop with output polarity control,
clock prescaler and selection logic,
a 16-bit up-counter,
two registers to hold the current and next pulse width values,
two registers to hold the current and next pulse period values,
a pulse width comparator,
a system state sequencer,
logic to create 0% and 100% pulses,
interrupt logic,
a status, interrupt and control register,
and a submodule bus interface section.
The PWMSM includes its own time base counter and does not use the CTM time base buses,
however the PWMSM does use the prescaled clock signal PCLK1 generated in the CPSM (see
Section 4). A block diagram of the PWMSM is shown in Figure 9-1.
9.2.1
Output flip-flop and pin
The output flip-flop is the basic output mechanism of the PWMSM. Except when the required pulse
width is 0% or 100%, the output flip-flop is set at the beginning of each period and is cleared at the
end of the designated pulse width. The polarity of the output pulse can be selected in software.
The output of the PWMSM is connected to an external, output-only pin. When the PWMSM is not
required, and is disabled by clearing the EN bit in the PWMSIC register, this pin serves as a digital
output-only port pin. When the PWMSM is disabled, the POL bit in the SIC register serves as an
output port bit.
9.2.2
Clock selection
The PWMSM contains an 8-bit prescaler that is clocked by the PCLK1 signal from the CPSM (i.e.
the MCU system clock divided by 2 or by 3). A 3-bit field (CLK[2:0]) in the PWMSM status, interrupt
and control register (PWMSIC) allows the software to select which of the 8 prescaler outputs drives
the PWMSM counter. The prescaler outputs are the main MCU clock divided by: 2, 4, 8, 16, 32,
F
.
Freescale Semiconductor, Inc.