LPC122X All information provided in this document is subject to legal disclaimers. © NXP B.V. 2011. All rights reserved.
Product data sheet Rev. 2 — 26 August 2011 22 of 61
NXP Semiconductors
LPC122x
32-bit ARM Cortex-M0 microcontroller
Comparator outputs connect to two timers, allowing for the recording of comparison
event time stamps.
7.15 General purpose external event counter/timers
The LPC122x includes two 32-bit counter/timers and two 16-bit counter/timers. The
counter/timer is designed to count cycles of the system derived clock. It can optionally
generate interrupts or perform other actions at specified timer values, based on four
match registers. Each counter/timer also includes up to four capture inputs to trap the
timer value when an input signal transitions, optionally generating an interrupt.
7.15.1 Features
A 32-bit/16-bit timer/counter with a programmable 32-bit/16-bit prescaler.
Counter or timer operation.
Up to four 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.
Four match registers per timer 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 corresponding to match registers, with the following
capabilities:
Set LOW on match.
Set HIGH on match.
Toggle on match.
Do nothing on match.
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.
Supports timed DMA requests.
7.16 Windowed WatchDog timer (WWDT)
The purpose of the watchdog is to reset the microcontroller within a windowed amount of
time if it enters an erroneous state. When enabled, the watchdog will generate a system
reset if the user program fails to ‘feed’ (or reload) the watchdog within a predetermined
amount of time.
7.16.1 Features
Internally resets chip if not periodically reloaded.
Debug mode.
Incorrect/Incomplete feed sequence causes reset/interrupt if enabled.
Safe operation: can be locked by software to be always on.
Flag to indicate watchdog reset.
Programmable 24-bit timer with internal prescaler.
LPC122X All information provided in this document is subject to legal disclaimers. © NXP B.V. 2011. All rights reserved.
Product data sheet Rev. 2 — 26 August 2011 23 of 61
NXP Semiconductors
LPC122x
32-bit ARM Cortex-M0 microcontroller
Selectable time period from (T
cy(WDCLK)
256 4) to (T
cy(WDCLK)
2
24
4) in
multiples of T
cy(WDCLK)
4.
The Watchdog Clock (WDCLK) source can be selected from the Internal RC oscillator
(IRC) or the Watchdog oscillator. This gives a wide range of potential timing choices of
Watchdog operation under different power reduction conditions. It also provides the
ability to run the WDT from an entirely internal source that is not dependent on an
external crystal and its associated components and wiring for increased reliability.
7.17 Real-time clock (RTC)
The RTC provides a basic alarm function or can be used as a long time base counter. The
RTC generates an interrupt after counting for a programmed number of cycles of the RTC
clock input.
7.17.1 Features
Uses dedicated 32 kHz ultra low-power oscillator.
Selectable clock inputs: RTC oscillator (1 Hz, delayed 1 Hz, or 1 kHz clock) or main
clock with programmable clock divider.
32-bit counter.
Programmable 32-bit match/compare register.
Software maskable interrupt when counter and compare registers are identical.
Generates wake-up from Deep-sleep and Deep power-down modes.
7.18 Clocking and power control
7.18.1 Crystal oscillators
The LPC122x include four independent oscillators. These are the system oscillator, the
Internal RC oscillator (IRC), the RTC 32 kHz oscillator (for the RTC only), and the
Watchdog oscillator. Except for the RTC oscillator, each oscillator can be used for more
than one purpose as required in a particular application.
Following reset, the LPC122x will operate from the Internal RC oscillator until switched by
software. This allows systems to operate without any external crystal and the bootloader
code to operate at a known frequency.
See Figure 5
for an overview of the LPC122x clock generation.
LPC122X All information provided in this document is subject to legal disclaimers. © NXP B.V. 2011. All rights reserved.
Product data sheet Rev. 2 — 26 August 2011 24 of 61
NXP Semiconductors
LPC122x
32-bit ARM Cortex-M0 microcontroller
7.18.1.1 Internal RC oscillator
The IRC may be used as the clock source for the WDT, and/or as the clock that drives the
PLL and subsequently the CPU. The nominal IRC frequency is 12 MHz. The IRC is
trimmed to 1 % accuracy over the entire voltage and temperature range.
Upon power-up or any chip reset, the LPC122x use the IRC as the clock source. Software
may later switch to one of the other available clock sources.
7.18.1.2 System oscillator
The system oscillator can be used as the clock source for the CPU, with or without using
the PLL.
Fig 5. LPC122x clocking generation block diagram
SYSTEM PLL
watchdog oscillator
IRC oscillator
IRC oscillator
IRC oscillator
watchdog oscillator
system oscillator
MAINCLKSEL
(main clock select)
SYSPLLCLKSEL
CLOCK
DIVIDER
AHB clock 0
(system)
CLOCK
DIVIDER
peripheral clocks
(SSP, UART0, UART1)
RTC
WWDT
watchdog oscillator
IRC oscillator
system oscillator
CLOCK
DIVIDER
CLKOUT pin
CLKOUTUEN
(CLKOUT clock update enable)
RTC oscillator 1 kHz clock
RTC oscillator 1 Hz clock
RTC oscillator 1 Hz delayed clock
RTCOSCCTRL
WDCLKSEL
(WWDT clock select)
main clock system clock
3
CLOCK
DIVIDER
SYSAHBCLKCTRL[1:31]
(AHB clock enable)
AHB clocks
1 to 31
(memories
and peripherals)
31
002aaf271
CLOCK
DIVIDER
peripheral clocks
(IOCONFIG glitch filter)
7

LPC1225FBD48/321,1

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
ARM Microcontrollers - MCU CORTEX M0 80K FL 8K DMA CRC ADC COMPARTR
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union