Intel PXA26X User Manual
Page 145
Intel® PXA26x Processor Family Developer’s Manual
4-37
System Integration Unit
4.3.3.2.2
Trim Example #2 – Measured Value Has a Fractional Component
This example is more common in that the measured frequency of the oscillator has a fractional
component. Again, the desired Hz-clock-output frequency is 1 Hz. If the oscillator output is
measured as 32768.92 cycles/s (Hz), an integer trim is necessary so that the average number of
cycles counted before generating one 1 Hz clock is 32768.92. Similar to the previous example, the
integer field RTTR[15:0] is loaded with the hexadecimal equivalent of 32768-1 or 0x0000_7FFF
(reset value).
Because the actual clock frequency is 0.92 cycles per second faster than the integer value, the Hz
clock generated by just the integer trimming is slightly faster than needed and must be slowed
down. Accordingly, program the fractional trim to delete 0.92 cycles per second on average to
bring the Hz-output frequency down to the proper value. Since the trimming procedure is
performed every 1023 (2
10
-1) seconds, the trim must be set to delete 941.16 clocks every 1023
seconds (.92 x 1023 = 941.16). Load the counter with the hexadecimal equivalent of 941, or
0x3AD. The fractional component of this value cannot be trimmed out and constitutes the error in
trimming, described below.
This trim setting leaves an error of. 16 cycles per 1023 seconds. The error calculation yields (in
parts-per-million or ppm):
4.3.3.2.3
Maximum Error Calculation Versus Real-Time Clock Accuracy
As seen from trim example #2, the maximum possible error approaches 1 clock per 2
10
-1 seconds.
Calculating the ppm error for this scenario yields:
To maintain an accuracy of +/- 5 seconds per month, the required accuracy is calculated to be:
This calculation indicates that the Hz-clock output can be made very accurate through the use of
the trim procedure. Likewise, use the trim procedure to compensate for a range of factors that can
affect crystal oscillators. Such factors can include, but are not limited to:
•
Manufacturing and supplier variance in the crystals
•
Crystal aging effects
•
System voltage differences
•
System manufacturing variance
Error
0.16 cycles
1023 sec
---------------------------
X
1 sec
32768 cycles
-------------------------------
0.002 ppm
=
=
Error (maximum)
1 cycle
1023 sec
---------------------
X
1 sec
32768
cycles
----------------------------------
0.03 ppm
=
=
Error
5 sec
month
---------------
X
1 month
2592000 sec
------------------------------
1.9 ppm
=
=