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
429 of 571
NXP Semiconductors
UM10316
Chapter 25: LPC29xx Pulse Width Modulator (PWM)
TRANS_EN_IN pin is high (update triggered by MSCSS Timer0 match3 output of
TRANS_EN_OUT of previous PWM block). If TRANS_ENA_SEL is low shadowing is
controlled via software.
4.
Functional description
The ability to provide flexible waveforms allows PWM blocks to be used in multiple appli-
cations, e.g. dimmer/lamp control and motor control. Pulse-width modulation is the pre-
ferred method to regulate power because no additional heat is generated and it is energy
efficient when compared to linear regulating voltage control networks.
PWM is used to deliver the waveforms/pulses of desired duty cycles and cycle periods.
The very basic application of these pulses can be in controlling the amount of power
transferred to a load. As the duty cycle of the pulses can be controlled, the desired
amount of power can be transferred for a controlled duration.
illustrates the operation of a PWM in continuous mode. Each PWM
consists of an internal 16-bit counter (CNT register). This counter is clocked with the
prescaled system clock (PRSC register). When the counter reaches the threshold defined
by the PRD register it resets and starts counting from the beginning.
The rising and falling edges of the PWM signal are freely configurable. The MTCHACT
register defines the position of the rising edge while the MTCHDEACT register defines the
falling edge of the waveform. The PWM output changes when the internal PWM counter
matches the values defined in the related registers (MTCHACT and MTCHDEACT).
The sync_in input of each PWM timer is used to reset (resynchronize) the PWM block.
The sync_out can be asserted immediately after the sync_in or can be delayed via the
SYNDEL register. Different PWM blocks can be triggered or synchronized under control of
the MODECTL register. In
the PWM0 is synchronized with PWM1. Each
time a sync event is provided to PWM0, PWM1 starts or restarts after the sync delay
programmed in the SYNDEL register.
Fig 110. Update configuration flowchart
Set internal PWM
counter clock to 1 MHz
PWM period
= 100 µs
PWM in continuous
mode, sync_out
activated, sync_in and
shadow register
update triggered by SW
Configure PWM0 output 0,
disable trap and carrier
Write first configuration
to PWM, duty cycle 50%
Force shadow-register
update