UM10346_1
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 01 — 2 November 2009
53 of 132
NXP Semiconductors
UM10346
LPC980/982 User manual
9.1 Real-time clock source
RTCS1/RTCS0 (RTCCON[6:5]) are used to select the clock source for the RTC if either
the Internal RC oscillator or the internal WD oscillator is used as the CPU clock. If the
internal crystal oscillator or the external clock input on XTAL1 is used as the CPU clock,
then the RTC will use CCLK as its clock source.
9.2 Changing RTCS1/RTCS0
RTCS1/RTCS0 cannot be changed if the RTC is currently enabled (RTCCON.0 = 1).
Setting RTCEN and updating RTCS1/RTCS0 may be done in a single write to RTCCON.
However, if RTCEN = 1, this bit must first be cleared before updating RTCS1/RTCS0.
9.3 Real-time clock interrupt/wake-up
If ERTC (RTCCON.1), EWDRT (IEN1.0.6) and EA (IEN0.7) are set to logic 1, RTCF can
be used as an interrupt source. This interrupt vector is shared with the watchdog timer. It
can also be a source to wake-up the device.
9.3.1 Real-time clock read back
Users can read RTCDATH and RTCDATL registers and get the 16-bit counter portion of
the RTC.
9.4 Reset sources affecting the Real-time clock
Only power-on reset and watchdog reset will reset the Real-time Clock and its associated
SFRs to their default state.
Fig 23. Real-time clock/system timer block diagram
RTCH
RTCL
RTCDATH
RTCDATL
RTC Reset
Power-on
reset
Reload on underflow
MSB
LSB
÷
128
23-bit down counter
Wake-up from power-down
Interrupt if enabled
(shared with WDT)
002aae091
ERTC
RTCF
RTC underflow flag
RTCEN
RTC enable
7-bit prescaler
RTCS1 RTCS2
RTC clk select
CCLK
internal
oscillators
LOW FREQ.
MED. FREQ.
HIGH FREQ.
XTAL2
XTAL1