UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
User manual
Rev. 1.3 — 6 July 2012
937 of 1269
NXP Semiconductors
UM10503
Chapter 35: LPC43xx Real-Time Clock (RTC)
[1]
This register value is not changed by reset.
35.7 Functional description
35.7.1 Register read procedure
The RTC uses two clocks, the bus interface clock (
CLK_M4_BUS) for register access and the
1 Hz clock provided by the RTCOSC in the battery powered low-power domain.
Writing data potentially takes up to 1.5 clock cycles of the 1 Hz clock to be captured in the
low-power domain. When reading, the registers reflect the actual content with a 0.5 clock
cycle delay of the 1 Hz clock, so the previously written data can show up to 2 clock cycles
of the 1 Hz clock later.
To read the correct register content, poll the last written register until it shows the new
value to ensure that the correct value has been captured. All earlier writes are also
captured at this point in time.
35.7.2 Calibration procedure
The calibration logic can periodically adjust the time counter either by not incrementing
the counter, or by incrementing the counter by 2 instead of 1. This allows calibrating the
RTC oscillator under some typical voltage and temperature conditions without the need to
externally trim the RTC oscillator.
A recommended method for determining the calibration value is to use the CLKOUT
feature to unintrusively observe the RTC oscillator frequency under the conditions it is to
be trimmed for, and calculating the number of clocks that will be seen before the time is off
by one second. That value is used to determine CALVAL.
The exact method of calibration depends on whether CALVAL is even or odd. For even
values, the hardware performs a two calibrations sequentially multiple times (one
calibration at 1 and one calibration at CALVAL - 1) and averages both calibration
values. For odd values of CALVAL, the calibration time is accurate.
If the RTC oscillator is trimmed externally, the same method of unintrusively observing the
RTC oscillator frequency may be helpful in that process.
Backward calibration
Enable the RTC timer and calibration in the CCR register (set bits CLKEN = 1 and
CCALEN = 0). In the CALIBRATION register, set the calibration value CALVAL
1 and
select CALDIR = 1.
•
The SEC timer and the calibration counter count up for every 1 Hz clock cycle.
Table 810. Alarm Year register (AYRS - address 0x4004 607C) bit description
Bit
Symbol
Description
Reset
value
11:0
YEAR
Year value in the range of 0 to 4095.
31:12
-
Reserved, user software should not write ones to reserved bits.
The value read from a reserved bit is not defined.
-