202
Philips Semiconductors
Preliminary User Manual
LPC2119/2129/2292/2294
ARM-based Microcontroller
PWM Latch Enable Register (PWMLER - 0xE0014050)
ThePWM Latch Enable Register is used to control the update of the PWM Match registers when they are used for PWM
generation. When software writes to the location of a PWM Match register while the Timer is in PWM mode, the value is held in
a shadow register. When a PWM Match 0 event occurs (normally also resetting the timer in PWM mode), the contents of shadow
registers will be transferred to the actual Match registers if the corresponding bit in the Latch Enable Register has been set. At
that point, the new values will take effect and determine the course of the next PWM cycle. Once the transfer of new values has
taken place, all bits of the LER are automatically cleared. Until the corresponding bit in the PWMLER is set and a PWM Match 0
event occurs, any value written to the PWM Match registers has no effect on PWM operation.
For example, if PWM2 is configured for double edge operation and is currently running, a typical sequence of events for changing
the timing would be:
• Write a new value to the PWM Match1 register.
• Write a new value to the PWM Match2 register.
• Write to the PWMLER, setting bits 1 and 2 at the same time.
• The altered values will become effective at the next reset of the timer (when a PWM Match 0 event occurs).
The order of writing the two PWM Match registers is not important, since neither value will be used until after the write to
PWMLER. This insures that both values go into effect at the same time, if that is required. A single value may be altered in the
same way if needed.
The function of each of the bits in the PWMLER is shown in Table 170.
Table 170: PWM Latch Enable Register (PWMLER - 0xE0014050)
PWMLER
Function
Description
Reset
Value
0
Enable PWM
Match 0 Latch
Writing a one to this bit allows the last value written to the PWM Match 0 register to be
become effective when the timer is next reset by a PWM Match event. See the
description of the PWM Match Control Register (PWMMCR).
0
1
Enable PWM
Match 1 Latch
Writing a one to this bit allows the last value written to the PWM Match 1 register to be
become effective when the timer is next reset by a PWM Match event. See the
description of the PWM Match Control Register (PWMMCR).
0
2
Enable PWM
Match 2 Latch
Writing a one to this bit allows the last value written to the PWM Match 2 register to be
become effective when the timer is next reset by a PWM Match event. See the
description of the PWM Match Control Register (PWMMCR).
0
3
Enable PWM
Match 3 Latch
Writing a one to this bit allows the last value written to the PWM Match 3 register to be
become effective when the timer is next reset by a PWM Match event. See the
description of the PWM Match Control Register (PWMMCR).
0
4
Enable PWM
Match 4 Latch
Writing a one to this bit allows the last value written to the PWM Match 4 register to be
become effective when the timer is next reset by a PWM Match event. See the
description of the PWM Match Control Register (PWMMCR).
0
5
Enable PWM
Match 5 Latch
Writing a one to this bit allows the last value written to the PWM Match 5 register to be
become effective when the timer is next reset by a PWM Match event. See the
description of the PWM Match Control Register (PWMMCR).
0
6
Enable PWM
Match 6 Latch
Writing a one to this bit allows the last value written to the PWM Match 6 register to be
become effective when the timer is next reset by a PWM Match event. See the
description of the PWM Match Control Register (PWMMCR).
0
7
Reserved
Reserved, user software should not write ones to reserved bits. The value read from
a reserved bit is not defined.
NA