277
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
15.5.7
RTC Accurate Clock Calibration
The crystal oscillator that drives the RTC may not be as accurate as expected mainly due to
temperature variation. The RTC is equipped with circuitry able to correct slow clock crystal drift.
To compensate for possible temperature variations over time, this accurate clock calibration cir-
cuitry can be programmed on-the-fly and also programmed during application manufacturing, in
order to correct the crystal frequency accuracy at room temperature (20-25°C). The typical clock
drift range at room temperature is ±20 ppm.
In a temperature range of -40°C to +85°C, the 32.768 KHz crystal oscillator clock inaccuracy can
be up to -200 ppm.
The RTC clock calibration circuitry allows positive or negative correction in a range of 1.5 ppm to
1950 ppm. After correction, the remaining crystal drift is as follows:
• Below 1 ppm, for an initial crystal drift between 1.5 ppm up to 90 ppm
• Below 2 ppm, for an initial crystal drift between 90 ppm up to 130 ppm
• Below 5 ppm, for an initial crystal drift between 130 ppm up to 200 ppm
The calibration circuitry acts by slightly modifying the 1 Hz clock period from time to time. When
the period is modified, depending on the sign of the correction, the 1 Hz clock period increases
or reduces by around 4 ms. The period interval between 2 correction events is programmable in
order to cover the possible crystal oscillator clock variations.
The inaccuracy of a crystal oscillator at typical room temperature (±20 ppm at 20-25 degrees
Celsius) can be compensated if a reference clock/signal is used to measure such inaccuracy.
This kind of calibration operation can be set up during the final product manufacturing by means
of measurement equipment embedding such a reference clock. The correction of value must be
programmed into the RTC Mode Register (RTC_MR), and this value is kept as long as the cir-
cuitry is powered (backup area). Removing the backup power supply cancels this calibration.
This room temperature calibration can be further processed by means of the networking capabil-
ity of the target application.
To ease the comparison of the inherent crystal accuracy with the reference clock/signal during
manufacturing, an internal prescaled 32.768KHz clock derivative signal can be assigned to drive
RTC output. To accommodate the measure, several clock frequencies can be selected among 1
Hz, 32 Hz, 64 Hz, 512 Hz.
In any event, this adjustment does not take into account the temperature variation.
The frequency drift (up to -200 ppm) due to temperature variation can be compensated using a
reference time if the application can access such a reference. If a reference time cannot be
used, a temperature sensor can be placed close to the crystal oscillator in order to get the oper-
ating temperature of the crystal oscillator. Once obtained, the temperature may be converted
using a lookup table (describing the accuracy/temperature curve of the crystal oscillator used)
and RTC_MR configured accordingly. The calibration can be performed on-the-fly. This adjust-
ment method is not based on a measurement of the crystal frequency/drift and therefore can be
improved by means of the networking capability of the target application.
If no crystal frequency adjustment has been done during manufacturing, it is still possible to do
it. In the case where a reference time of the day can be obtained through LAN/WAN network, it
is possible to calculate the drift of the application crystal oscillator by comparing the values read
on RTC Time Register (RTC_TIMR) and programming the HIGHPPM and CORRECTION bit-
fields on RTC_MR according to the difference measured between the reference time and those
of RTC_TIMR.
Содержание SAM4S Series
Страница 44: ...44 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 412: ...412 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 1105: ...1105 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 1142: ...1142 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 3 100 ball VFBGA Package Drawing ...
Страница 1143: ...1143 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 4 64 lead LQFP Package Drawing ...
Страница 1145: ...1145 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 5 64 lead QFN Package Drawing ...