Philips LPC2119 User Manual page 202

Arm-based microcontroller
Hide thumbs Also See for LPC2119:
Table of Contents

Advertisement

Philips Semiconductors
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
Enable PWM
0
Match 0 Latch
Enable PWM
1
Match 1 Latch
Enable PWM
2
Match 2 Latch
Enable PWM
3
Match 3 Latch
Enable PWM
4
Match 4 Latch
Enable PWM
5
Match 5 Latch
Enable PWM
6
Match 6 Latch
7
Reserved
Pulse Width Modulator (PWM)
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).
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).
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).
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).
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).
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).
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).
Reserved, user software should not write ones to reserved bits. The value read from
a reserved bit is not defined.
LPC2119/2129/2292/2294
Description
202
Preliminary User Manual
Reset
Value
0
0
0
0
0
0
0
NA
January 08, 2004

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lpc2129Lpc2292Lpc2294

Table of Contents