
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
506 of 808
NXP Semiconductors
UM10360
Chapter 25: LPC17xx Motor Control PWM
7.5 MCPWM Timer/Counter 0-2 registers (MCTC0-2 - 0x400B 8018,
0x400B 801C, 0x400B 8020)
These registers hold the current values of the 32-bit counter/timers for channels 0-2. Each
value is incremented on every PCLK, or by edges on the MCI0-2 pins, as selected by
MCCNTCON. The timer/counter counts up from 0 until it reaches the value in its
corresponding MCPER register (or is stopped by writing to MCCON_CLR).
A TC register can be read at any time, but can only be written to when its channel is
stopped.
7.6 MCPWM Limit 0-2 registers (MCLIM0-2 - 0x400B 8024, 0x400B 8028,
0x400B 802C)
These registers hold the limiting values for timer/counters 0-2. When a timer/counter
reaches its corresponding limiting value: 1) in edge-aligned mode, it is reset and starts
over at 0; 2) in center-aligned mode, it begins counting down until it reaches 0, at which
time it begins counting up again.
If the channel’s CENTER bit in MCCON is 0 selecting edge-aligned mode, the match
between TC and LIM switches the channel’s A output from “active” to “passive” state. If
the channel’s CENTER and DTE bits in MCCON are both 0, the match simultaneously
switches the channel’s B output from “passive” to “active” state.
If the channel’s CENTER bit is 0 but the DTE bit is 1, the match triggers the channel’s
deadtime counter to begin counting -- when the deadtime counter expires, the channel’s B
output switches from “passive” to “active” state.
In center-aligned mode, matches between a channel’s TC and LIM registers have no
effect on its A and B outputs.
Writing to either a Limit or a Match (
) register loads a “write” register, and if the channel
is stopped it also loads an “operating” register that is compared to the TC. If the channel is
running and its “disable update” bit in MCCON is 0, the operating registers are loaded
from the write registers: 1) in edge-aligned mode, when the TC matches the operating
Limit register; 2) in center-aligned mode, when the TC counts back down to 0. If the
channel is running and the “disable update” bit is 1, the operating registers are not loaded
from the write registers until software stops the channel.
Reading an MCLIM address always returns the operating value.
Table 453. MCPWM Count Control clear address (MCCAPCON_CLR - 0x400B 8064) bit
description
Bit
Description
31:0
Writing one(s) to this write-only address clears the corresponding bit(s) in the
MCCNTCON register. See
for the bit allocation.
Table 454. MCPWM Timer/Counter 0-2 registers (MCTC0-2 - 0x400B 8018, 0x400B 801C,
0x400B 8020) bit description
Bit
Symbol
Description
Reset value
31:0
MCTC0-2
Timer/Counter values for channels 0-2
0x0000 0000