annotate doc/RF-cal/VCXO-notes @ 231:a58a7bbc0618

CHANGES: first changes since fc-host-tools-r5
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 03 Aug 2017 03:21:39 +0000
parents 2d9b1d69862d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
186
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 How to calibrate the VCXO on your FreeCalypso development board
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 ===============================================================
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 The process of calibrating the VCXO on a Calypso+Iota+Rita GSM MS consists of
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 the following fundamental parts:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 * The antenna needs to be disconnected and the FreeCalypso device's RF output
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 (SMA on the FCDEV3B) needs to be connected to an RF test station such as an
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 R&S CMU200.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 * The DUT is commanded to transmit semi-continuously as if it were transmitting
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 on TCH: Tx in one timeslot out of 8, but with the DUT running its own notion
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 of the TDMA frame not synchronized to anything, and keep transmitting
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 endlessly in 1/8 out of every 4.615 ms.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 * The RF test station connected to the DUT is used in the RF analyzer mode to
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 measure the frequency offset of the DUT's signal, relative to the ideal uplink
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 frequency corresponding to the selected ARFCN.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 * The above frequency offset measurement is performed with the AFC DAC on the
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 Calypso device set to different values, the results of the initial
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 measurements are used to guide some additional measurements, some computations
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 are made from these results, and the computed values are written into the
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 FreeCalypso device's FFS.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 This procedure is meant to be automated by way of a program that talks both to
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 the FreeCalypso DUT and to the RF test station and orchestrates all of the
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 measurement and computation steps, but until this program gets written (we
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 weren't able to get a hold of TI's original, hence we have to develop our own),
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 use the following instructions to perform the VCXO calibration procedure
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 manually. You still need a CMU200 or equivalent, though - it is not possible
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 to do any kind of calibration on a Calypso device by itself, without connecting
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 it to some appropriate RF test equipment.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 Reference documentation
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 =======================
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 We have the following two TI documents which describe some of the RF calibration
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 procedures including the one for the VCXO:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 ftp://ftp.freecalypso.org/pub/GSM/Calypso/rf_calibration.pdf
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 https://www.freecalypso.org/LoCosto-docs/Production%20test%20and%20calibration/i_sample_rf_test_and_calibration_13_03_04_01991%20-%20v026.pdf
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 Unfortunately neither of them corresponds to the exact evolutionary time point
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 of interest to us: the first one corresponds to some chipset much earlier than
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 the one we are working with, and to firmware versions much earlier than ours,
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 whereas the second one is for TI's later LoCosto chipset.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 Commanding the DUT to transmit semi-continuously
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 ================================================
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 There is only one VCXO calibration that is subsequently used for all bands in
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 normal MS operation. Both of the calibration instruction documents above
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 instruct the operator to run the Tx in GSM900 mode on ARFCN 40, hence we shall
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 do likewise until and unless we find some good reason to do differently.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 Issue the following commands through fc-tmsh to start the semi-continuous Tx:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 tms 1 # enter RF Test Mode
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 rfpw 7 6 0 # select GSM 900+1800 band pair, GSM900 band within the pair
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 rfpw 2 40 # set ARFCN to 40
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 rfpw 8 0 # disable AFC algorithm, i.e., control the AFC DAC manually
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 txpw 1 12 # Tx power level
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 rfe 3 # start Rx & Tx without network sync
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 WARNING: Before issuing the above commands, ensure that the antenna is
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 disconnected and that the RF output will be going into your test equipment,
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 not on the air! Do not EVER issue these commands with a real antenna connected,
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 unless your intent is to operate a rogue transmitter or jammer.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 At this point your CMU200 or equivalent should detect the uplink signal
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 generated by the DUT (on the CMU200 one needs to set TSC to 5, dunno about
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 other test equipment), and you should see some frequency offset.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 The actual calibration procedure
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 ================================
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 1. Set the AFC DAC to -2048:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 rfpw 9 -2048
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 and measure the frequency offset. Note it down.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 2. Set the AFC DAC to +2048:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 rfpw 9 2048
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 and again measure the frequency offset. Note it down.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 Now you need to create an ASCII text file with your frequency offset
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 measurements. Each line represents one measurement and consists of two fields:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 the first field is the DAC value and the second field is the measured frequency
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 offset in Hz. On my FCDEV3B S/N 001 the first two measurements were:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 -2048 -30008
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 +2048 +21394
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 Next you need to apply a linear model to the VCXO frequency offset as a function
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 of the DAC input: if x is the DAC value and F is the resulting frequency offset,
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 then the linear model is F = ax + b, where a and b need to be determined from
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 two measured points (x1, F1) and (x2, F2). Then once you have a and b, find the
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 x value that should produce F = 0. The fc-vcxo-linear utility will do this math
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 for you: run it with the name of your text file with measurements as its only
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 argument.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 With my measurements, the DAC_CENTER value computed by fc-vcxo-linear is 343.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 However, the linear model is not perfect, thus when you write this computed
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 value into the DAC with the rfpw 9 command, the resulting frequency offset on
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 the CMU200 screen may be quite far from 0.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 TI's instructions in the LoCosto document direct the calibration operator to do
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 two more measurements at DAC_CENTER-100 and DAC_CENTER+100, where DAC_CENTER is
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 the value we just computed by applying the linear model to the first two
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 measurements. However, in my case the frequency offset at DAC=343 (DAC_CENTER)
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 was so negative that at DAC=443 (DAC_CENTER+100) it was still negative - and I
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 assume that TI's intent was to capture a close range around the zero crossing.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 Therefore, when I get to writing the automated calibration program, I intend to
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 change this part of the algorithm as follows: instead of adding or subtracting
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 100 right now, first do an rfpw 9 with the DAC_CENTER value as computed from
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 the linear model, make a frequency offset measurement, and see if it is negative
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 or positive. Then step the DAC value in the appropriate direction by some
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 reasonable increment (e.g., 100) until the frequency offset changes sign. Then
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 take the two DAC values closest to the output frequency offset sign change.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 After doing the above, my measurement notes file became:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 -2048 -30008
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 +2048 +21394
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 443 -669
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 543 634
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 This file needs to contain all four measurements, with the first two being at
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 the extreme DAC values and with the second two hugging the empirically located
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 zero crossing, when you feed it to the next step:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 fc-vcxo-param myvcxo.meas
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 The fc-vcxo-param utility will compute the final math steps to produce the
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 actual calibration values which will need to be uploaded to the FreeCalypso
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 device and stored in its FFS. With my measurements above, I got the following
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 output:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 rf_table afcparams
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 3434 # Psi_sta_inv
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 15 # Psi_st
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 1000341 # Psi_st_32
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 4293 # Psi_st_inv
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 3954 # DAC_INIT * 8
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 -5860 # DAC_MIN * 8
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 11351 # DAC_MAX * 8
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 2560 # snr_thr
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 # DAC_INIT: rfpw 10 494
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 The output from fc-vcxo-param is in the rf_table format which our implementation
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 of the rftw command takes as input, and the latter is the fc-tmsh command which
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 you will need to issue in order to send this table to the FreeCalypso firmware
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 in the DUT.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 Explanation of the numbers:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 * The Psi constants are computed from the slope of the VCXO, and are
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 subsequently used for the steering: when the DSP reports a particular
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 frequency offset (in the form of an angle in radians), by how much should the
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 DAC value be adjusted? The slope I use for computing these Psi constants is
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 the one from the first two measurements at the extreme DAC values, as the
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 LoCosto document seems to indicate.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 * DAC_INIT is the DAC value at which the resulting frequency offset should be 0;
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 it is computed per the linear model from the second pair of measurements.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 * DAC_MIN and DAC_MAX are the DAC values which should produce frequency offsets
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 of -15 and +15 ppm, respectively, according to the LoCosto document. I
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 compute them per the linear model from the first pair of measurements (the
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 extreme DAC ones), as that is what the LoCosto document says.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 * The SNR threshold is a constant that never needs to change.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 The 3 dac_* values in the afcparams structure are stored in the times 8 form.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 Examination of the afcparams values read out of several Openmoko-made GTA02
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 units shows that the low 3 bits aren't necessarily zeros, indicating that TI's
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 calibration program probably multiplied by 8 before converting from floating
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 point to integer; I do likewise in fc-vcxo-param.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 Examination of the same afcparams values read out of Openmoko-made units also
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 shows that the center, min and max DAC values do vary quite a bit from one unit
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 to the next, whereas the Psi constants change very little. The Psi constants
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 which my program computed from my manual measurements on FCDEV3B S/N 001 are in
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 the same range as those read out of Openmoko-made units, which is definitely a
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 reassuring sign.
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 Writing your VCXO calibration into FFS
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 ======================================
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 Save the fc-vcxo-param output in a file, e.g.:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 fc-vcxo-param myvcxo.meas myvcxo.param
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 Upload the generated afcparams table to your FreeCalypso device:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 rftw 9 myvcxo.param
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 There is one more variable in the firmware, outside of the afcparams structure,
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 which also holds the DAC_INIT value. Set it with an rfpw 10 command as
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 instructed in the last comment line emitted by fc-vcxo-param; in my case it was:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 rfpw 10 494
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 Now save all of these values in the non-volatile flash file system:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 me 102
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 me 103
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 Cleaning up
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 ===========
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 To shut off the transmitter you started earlier, issue this command:
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 rfe 0
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 Now power off your FreeCalypso device, disconnect the RF test setup, connect the
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 antenna back, insert a SIM, do a fresh boot and see if you can connect to a real
9968717eedd7 doc/VCXO_calibration written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 live GSM network with your VCXO calibration!