
UM10850
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 2.4 — 13 September 2016
204 of 464
14.1 How to read this chapter
These five standard timers are available on all LPC5410x parts.
14.2 Basic configuration
•
Set the appropriate bits to enable clocks to timers that will be used: CT32B0 and
CT32B1 in the ASYNCAPBCLKCTRL register, CT32B2, CT32B3, and CT32B4 in the
AHBCLKCTRL1 register.
•
Clear the timer reset using the ASYNCPRESETCTRL register (
and 1) and the PRESETCTRL1 register (
for CT32B2, 3, and 4).
•
Pins: Select timer pins and pin modes as needed through the relevant IOCON
registers (
).
•
Interrupts: See register MCR (
) and CCR (
) for match and capture
events. Interrupts are enabled in the NVIC using the appropriate Interrupt Set Enable
register.
•
DMA: Some timer match conditions can be used to generate timed DMA requests,
see
.
14.3 Features
•
Each is a 32-bit counter/timer with a programmable 32-bit prescaler. Four of the
timers include external capture and match pin connections.
•
Counter or timer operation.
•
For each timer with pin connections, up to 4 32-bit capture channels that can take a
snapshot of the timer value when an input signal transitions. A capture event may also
optionally generate an interrupt.
•
The timer and prescaler may be configured to be cleared on a designated capture
event. This feature permits easy pulse-width measurement by clearing the timer on
the leading edge of an input pulse and capturing the timer value on the trailing edge.
•
Four 32-bit match registers that allow:
–
Continuous operation with optional interrupt generation on match.
–
Stop timer on match with optional interrupt generation.
–
Reset timer on match with optional interrupt generation.
•
For each timer with pin connections, up to 4 external outputs corresponding to match
registers with the following capabilities:
–
Set LOW on match.
–
Set HIGH on match.
–
Toggle on match.
–
Do nothing on match.
UM10850
Chapter 14: LPC5410x Standard counter/timers
(CT32B0/1/2/3/4)
Rev. 2.4 — 13 September 2016
User manual