© Koninklijke Philips Electronics N.V. 2006. All rights reserved.
User manual
Rev. 01 — 12 January 2006
220
Philips Semiconductors
UM10161
Volume 1
Chapter 17: RTC
17.5 RTC usage notes
If the RTC is used, VBAT must be connected to either pin V
3
or an independent power
supply (external battery). If VBAT is not connected, the VBAT pin has to be pulled high or
remain open. No provision is made in the LPC2101/02/03 to retain RTC status upon the
VBAT power loss, or to maintain time incrementation if the clock source is lost, interrupted,
or altered.
Since the RTC operates using one of two available clocks (the APB clock (PCLK) or the
32 kHz signal coming from the RTXC1-2 pins), any interruption of the selected clock will
cause the time to drift away from the time value it would have provided otherwise. The
variance could be to actual clock time if the RTC was initialized to that, or simply an error
in elapsed time since the RTC was activated.
While the signal from RTXC1-2 pins can be used to supply the RTC clock at anytime,
selecting the PCLK as the RTC clock and entering the Power-down mode will cause a
lapse in the time update. Also, feeding the RTC with the PCLK and altering this timebase
during system operation (by reconfiguring the PLL, the APB divider, or the RTC prescaler)
will result in some form of accumulated time error. Accumulated time errors may also
occur when the RTC clock source is switched between the PCLK and the RTXC pins.
Once the 32 kHz signal from RTXC1-2 pins is selected as a clock source, the RTC can
operate completely without the presence of the APB clock (PCLK). Therefore, power
sensitive applications (i.e. battery powered application) utilizing the RTC will reduce the
power consumption by using the signal from RTXC1-2 pins and writing a 0 into the
PCRTC bit in the PCONP power control register (see
Section 3.9 “Power control” on page
).
17.6 Reference clock divider (prescaler)
The reference clock divider (hereafter referred to as the prescaler) allows generation of a
32.768 kHz reference clock from any peripheral clock frequency greater than or equal to
65.536 kHz (2
×
32.768 kHz). This permits the RTC to always run at the proper rate
regardless of the peripheral clock rate. Basically, the Prescaler divides the peripheral
clock (PCLK) by a value which contains both an integer portion and a fractional portion.
The result is not a continuous output at a constant frequency, some clock periods will be
one PCLK longer than others. However, the overall result can always be 32,768 counts
per second.
Table 196: Alarm registers
Name
Size
Description
Access
Address
ALSEC
6
Alarm value for Seconds
R/W
0xE002 4060
ALMIN
6
Alarm value for Minutes
R/W
0xE002 4064
ALHOUR
5
Alarm value for Hours
R/W
0xE002 4068
ALDOM
5
Alarm value for Day of Month
R/W
0xE002 406C
ALDOW
3
Alarm value for Day of Week
R/W
0xE002 4070
ALDOY
9
Alarm value for Day of Year
R/W
0xE002 4074
ALMON
4
Alarm value for Months
R/W
0xE002 4078
ALYEAR
12
Alarm value for Years
R/W
0xE002 407C