LPC5411x
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2018. All rights reserved.
Product data sheet
Rev. 2.1 — 9 May 2018
40 of 105
NXP Semiconductors
LPC5411x
32-bit ARM Cortex-M4/M0+ microcontroller
7.20 Standard counter/timers (CTimer0 to 4)
The LPC5411x includes five general-purpose 32-bit timer/counters.
The timer/counter is designed to count cycles of the system derived clock or an
externally-supplied clock. It can optionally generate interrupts, generate timed DMA
requests, or perform other actions at specified timer values, based on four match
registers. Each timer/counter also includes two capture inputs to trap the timer value when
an input signal transitions, optionally generating an interrupt.
7.20.1 Features
•
A 32-bit timer/counter with a programmable 32-bit prescaler.
•
Counter or timer operation.
•
Up to four 32-bit capture channels per timer, that can take a snapshot of the timer
value when an input signal transitions. A capture event may also 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.
•
Up to four external outputs per timer corresponding to match registers with the
following capabilities:
–
Set LOW on match.
–
Set HIGH on match.
–
Toggle on match.
–
Do nothing on match.
•
Up to two match registers can be used to generate timed DMA requests.
•
PWM mode using up to three match channels for PWM output.
7.20.2 SCTimer/PWM subsystem
The SCTimer/PWM is a flexible timer module capable of creating complex PWM
waveforms and performing other advanced timing and control operations with minimal or
no CPU intervention.
The SCTimer/PWM can operate as a single 32-bit counter or as two independent, 16-bit
counters in uni-directional or bi-directional mode. It supports a selection of match registers
against which the count value can be compared, and capture registers where the current
count value can be recorded when some pre-defined condition is detected.
The SCTimer/PWM module supports multiple separate events that can be defined by the
user based on some combination of parameters including a match on one of the match
registers, and/or a transition on one of the SCTimer/PWM inputs or outputs, the direction
of count, and other factors.