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
436 of 571
NXP Semiconductors
UM10316
Chapter 25: LPC29xx Pulse Width Modulator (PWM)
The counting process starts once the CNT_ENA bit is set. The counting process can be
reset by setting the CNT_RESET bit. The PWM counter and prescale counter remain in
the reset state as long as the CNT_RESET bit is active.
When the update enable (UPD_ENA) bit register is set, an update of the shadow registers
(see
) is initiated. Software should not modify the contents of the registers
until the UPDATE_ENABLE bit is cleared by the device, indicating that the update of the
shadow registers is done by the hardware.
The actual moment the PWM shadow registers are updated is controlled by two other bit
fields in the MODECTL register; TRANS_ENA (transfer enable) and TRANS_ENA_SEL. If
TRANS_ENA_SEL is set updating of the shadow registers is done by the hardware on an
active HIGH-level on the trans_enable_in pin of the PWM. If TRANS_ENA_SEL is
cleared, the trans_enable_in pin is ignored and update of the shadow registers takes
place when the TRANS_ENA bit is set AND the PWM counter starts a new cycle. This
happens when the counter overflows, or on an active HIGH signal on the sync_in input pin
(if enabled via the SYNC_SEL bit of the MODECTL register).
When shadow registers are stable in the PWM domain the TRANS_ENA bit field is
automatically reset, and an interrupt might then be generated.
Table 346. MODECTL register bit description
* = reset value
Bit
Symbol
Access
Value
Description
31
reserved
R
0
Reserved
30-8
reserved
R
-
Reserved
7
UPD_ENA
R/W
1
Enables synchronization to the PWM
domain. This bit is automatically reset
when synchronization is finished
0*
6
TRANS_ENA
R/W
1
Enables transfer to the compare registers.
Effective transfer is done when the PWM
counter overflows if TRANS_ENA is
logic 1. See
. This bit is
automatically reset when shadowing is
finished
0*
5
TRANS_ENA_SEL
R/W
Selection of the enable signal which allows
the transfer of the new set of values;
see
1
active HIGH-level on trans_enable_in pin
0*
TRANS_ENA bit of the MODECTL register
4
SYNC_SEL
R/W
Selection of the synchronization source;
see
1
Sync_in pin
0*
Internal
3
SYNC_OUT_ENA
R/W
Sync_out enable
1
Sync_out is active
0*
Sync_out is stuck LOW