
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
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
485 of 808
NXP Semiconductors
UM10360
Chapter 24: LPC17xx Pulse Width Modulator (PWM)
4.1 Rules for Single Edge Controlled PWM Outputs
1. All single edge controlled PWM outputs go high at the beginning of a PWM cycle
unless their match value is equal to 0.
2. Each PWM output will go low when its match value is reached. If no match occurs (i.e.
the match value is greater than the PWM rate), the PWM output remains continuously
high.
4.2 Rules for Double Edge Controlled PWM Outputs
Five rules are used to determine the next value of a PWM output when a new cycle is
about to begin:
1. The match values for the
next
PWM cycle are used at the end of a PWM cycle (a time
point which is coincident with the beginning of the next PWM cycle), except as noted
in rule 3.
2. A match value equal to 0 or the current PWM rate (the same as the Match channel 0
value) have the same effect, except as noted in rule 3. For example, a request for a
falling edge at the beginning of the PWM cycle has the same effect as a request for a
falling edge at the end of a PWM cycle.
3. When match values are changing, if one of the "old" match values is equal to the
PWM rate, it is used again once if the neither of the new match values are equal to 0
or the PWM rate, and there was no old match value equal to 0.
4. If both a set and a clear of a PWM output are requested at the same time, clear takes
precedence. This can occur when the set and clear match values are the same as in,
or when the set or clear value equals 0 and the other value equals the PWM rate.
5. If a match value is out of range (i.e. greater than the PWM rate value), no match event
occurs and that match channel has no effect on the output. This means that the PWM
output will remain always in one state, allowing always low, always high, or
"no change" outputs.
5.
Pin description
gives a brief summary of each of PWM related pins.
Table 425. Pin summary
Pin
Type
Description
PWM1[1]
Output
Output from PWM channel 1.
PWM1[2]
Output
Output from PWM channel 2.
PWM1[3]
Output
Output from PWM channel 3.
PWM1[4]
Output
Output from PWM channel 4.
PWM1[5]
Output
Output from PWM channel 5.
PWM1[6]
Output
Output from PWM channel 6.
PCAP1[1:0]
Input
Capture Inputs. A transition on a capture pin can be configured to load
the corresponding Capture Register with the value of the Timer
Counter and optionally generate an interrupt. The PWM brings out 2
capture inputs.