![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 1099](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_17218271099.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
1099 of 1441
NXP Semiconductors
UM10503
Chapter 37: LPC43xx/LPC43Sxx Real-Time Clock (RTC)
[1]
This register value is not changed by reset.
37.7 Functional description
37.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.
Within one second after a wake-up from a low power mode, the read values may be
incorrect. This can be resolved by either re-reading the register more than 1 sec after
wake-up or by reading the value until it has changed.
37.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.
Table 904. 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.
-