
Chapter 20 Pulse Width Modulator with Fault Protection (PMF15B6C) Module
MC9S12XF - Family Reference Manual, Rev.1.19
Freescale Semiconductor
931
The 12-bit value written to this register is the number of PWM clock cycles in complementary channel
operation. A reset sets the PWM deadtime register to a default value of 0x0FFF, selecting a deadtime of
4096-PWM clock cycles minus one bus clock cycle.
NOTE
Deadtime is affected by changes to the prescaler value. The deadtime
duration is determined as follows: DT = P
× PMFDTMC – 1, where DT is
deadtime, P is the prescaler value, PMFDTMC is the programmed value of
dead time. For example: if the prescaler is programmed for a divide-by-two
and the PMFDTMC is set to ve, then P = 2 and the deadtime value is equal
to DT = 2
× 5 – 1 = 9 IPbus clock cycles. A special case exists when the
P = 1, then DT = PMFDTMC.
20.4
Functional Description
20.4.1
Block Diagram
A block diagram of the PMF is shown in Figure 20-1. The MTG bit allows the use of multiple PWM
generators (A, B, and C) or just a single generator (A). PWM0 and PWM1 constitute Pair A, PWM2 and
PWM3 constitute Pair B, and PWM4 and PWM5 constitute Pair C.
20.4.2
Prescaler
To permit lower PWM frequencies, the prescaler produces the PWM clock frequency by dividing the bus
clock frequency by one, two, four, and eight. Each PWM generator has its own prescaler divisor. Each
prescaler is buffered and will not be used by its PWM generator until the corresponding Load OK bit is set
and a new PWM reload cycle begins.
20.4.3
PWM Generator
Each PWM generator contains a 15-bit up/down PWM counter producing output signals with software-
selectables:
Alignment — The logic state of each pair EDGE bit determines whether the PWM pair outputs are
edge-aligned or center-aligned
Period — The value written to each pair PWM counter modulo register is used to determine the
PWM pair period. The period can also be varied by using the prescaler
With edge-aligned output, the modulus is the period of the PWM output in clock cycles
With center-aligned output, the modulus is one-half of the PWM output period in clock cycles
Pulse width — The number written to the PWM value register determines the pulse width duty
cycle of the PWM output in clock cycles
— With center-aligned output, the pulse width is twice the value written to the PWM value register
— With edge-aligned output, the pulse width is the value written to the PWM value register