DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
431 of 571
NXP Semiconductors
UM10316
Chapter 25: LPC29xx Pulse Width Modulator (PWM)
4.3 Center-aligned PWM
Center-aligned PWM can be easily achieved via software by using the MTCHACT and
MTCHDEACT registers.
4.4 Input capturing
Each PWM has four capture channels, with channels 2 and 3 on the same external pin so
that in effect there are only three external capture sources per PWM. The capture source
for each channel can be selected from the external PWM capture source (capture pin),
TRAP signal, the sync_in signal and the trans_enable_in signal. In this mode, the
counter's content is latched into the respective capture registers in response to an
external event. This event can be programmed to be effective on a negative, a positive or
both a negative and a positive transition at the corresponding external input pin. Interrupts
can be generated at each transition of the external-capture input pin.
4.5 Modulation of PWM and timer carrier
The PWM block has a carrier input pin. This means that active phases of the PWM
outputs can be further modulated, e.g. to influence the speed or torque of a motor.
Using the burst method (BURST_ENA), the active phases of the pulse-width modulated
outputs are modulated by the output of the MSCSS Timer1 (Timer_PWM). The
modulating signal typically has a higher frequency than the modulated output signals. The
BURST_ENA bits of the CTRL register are used to enable modulation of the carrier and a
particular PWM output. The carrier signal is derived from the match output of the MSCSS
Timer 1 (Timer_PWM).
Fig 112. Delayed-update configuration flowchart
MSCSS timer0
resolution = 1 µs
PWM in continuous
mode, sync_out
activated, sync_in
and shadow-register
update triggered
by timer match
Configure PWM0 output 0,
disable trap and carrier
Write first configuration
to PWM, duty cycle 25%
MSCSS timer0 match
after 100 µs -> force
shadow-register
update
Configure MSCSS timer0,
enable match 3 output,
stop on match, toggle
output on match event