LOAD
0
COMPB
COMPA
pwmB
pwmA
LOAD
0
COMPA
load
zero
cmpB
cmpA
dir
BUp
AUp
ADown
BDown
COMPB
Functional Description
1440
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
Pulse Width Modulator (PWM)
Figure 21-4. PWM Count Up/Down Mode
21.3.4 PWM Signal Generator
Each PWM generator takes the load, zero, cmpA, and cmpB pulses (qualified by the dir signal) and
generates two internal PWM signals, pwmA and pwmB. In Count-Down mode, there are four events that
can affect these signals: zero, load, match A down, and match B down. In Count-Up/Down mode, there
are six events that can affect these signals: zero, load, match A down, match A up, match B down, and
match B up. The match A or match B events are ignored when they coincide with the zero or load events.
If the match A and match B events coincide, the first signal, pwmA, is generated based only on the match
A event, and the second signal, pwmB, is generated based only on the match B event.
For each event, the effect on each output PWM signal is programmable: it can be left alone (ignoring the
event), it can be toggled, it can be driven low, or it can be driven high. These actions can be used to
generate a pair of PWM signals of various positions and duty cycles, which do or do not overlap.
shows the use of Count-Up/Down mode to generate a pair of center-aligned, overlapped
PWM signals that have different duty cycles. This figure shows the pwmA and pwmB signals before they
have passed through the dead-band generator.
Figure 21-5. PWM Generation Example In Count-Up/Down Mode
In this example, the first generator is set to drive High on match A up, drive low on match A down, and
ignore the other four events. The second generator is set to drive high on match B up, drive low on match
B down, and ignore the other four events. Changing the value of comparator A changes the duty cycle of
the pwmA signal, and changing the value of comparator B changes the duty cycle of the pwmB signal.