annotate doc/Tx-cal-theory @ 79:394daa4ad6e8

fc-rfcal-txband: dBm to Vout function implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 15 Jul 2017 21:06:43 +0000
parents 8e675142cca7
children 615df2fb1ec3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
66
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 The Tx power levels put out by a GSM mobile station are subject to strict
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 specifications, and on the Calypso+Iota+Rita chipset they are produced by
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 writing different values into the APC DAC register. But what value should be
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 written into the APC DAC in order to produce a given Tx power level in dBm?
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 The answer varies from one produced device unit to the next, and even more from
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 one board design to the next, hence these APC values need to be calibrated.
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 The general procedure for calibrating Tx power levels is described in both Sara
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 and LoCosto calibration documents (see TI-docs), but the LoCosto document adds
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 one crucial detail which the Sara one fails to describe. The instructions given
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 in the Sara document appear to be perfectly intuitive at first: go through all
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 power levels in turn (PL numbers 5-19 for EGSM and GSM850 or 0-15 for DCS and
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 PCS), and for each power level command the DUT to transmit at that level,
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 measure the actual Tx output power with the CMU200 or other RF test equipment,
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 and adjust the APC DAC value up or down to make the output power match the spec.
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 The problem is with the very last part: the output power you get with the
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 compiled-in APC DAC value is one number, the spec-defined target power is a
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 different number, exactly how do you adjust the APC DAC value to hit the target
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 power level?
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 The LoCosto document gives the answer which was not at all obvious to me at
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 first. I draw the reader's attention to section A.3.1 on page 43 of that
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 document. The trick is as follows: the relation between the APC DAC value and
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 the resulting Tx output power (or rather the equivalent in terms of voltage) is
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 modeled as a piecewise linear function, and this piecewise linear function is
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 constructed from a preliminary set of output power measurements with a fixed
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 set of APC DAC values.
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 We also have a strong piece of evidence that the Tx power level calibration
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 procedure performed by Openmoko at their factory was based on the same principle
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 as the LoCosto document version. If you look at the /gsm/rf/tx/levels.900 table
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 in Om-calibrated GTA02 units and compare it against the firmware's compiled-in
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 version, you will see that the APC DAC values for power levels 5-19 have been
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 replaced with calibrated ones as expected, but there is also this oddity: the
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 APC DAC value for power level 0 (not a valid number for this band) has been
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 replaced with 600. Always 600, a perfect round number, on every unit.
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 Having understood the calibration method described in the LoCosto document, the
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 mystery of this fixed number 600 becomes clear: the calibration program
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 establishes the basis for the calibration by temporarily overwriting the APC DAC
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 value in the power level 0 slot with a series of fixed values, 600 being the
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 last of them. It constructs the piecewise linear model for the APC from power
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 measurements made with these fixed DAC values, and uses this model to compute
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 the DAC value for each target power level. The latter DAC values are then
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 written into Tx levels table slots 5-19 for EGSM and GSM850, or 0-15 for DCS
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 and PCS. In the case of DCS and PCS no visible artifacts remain from the
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 calibration basis run (because slot 0 is a valid power level for these bands),
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 but an artifact remains in the levels.900 table in the unused slot 0.
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 In the present FreeCalypso RF calibration tools suite the planned
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 fc-rfcal-txband program that will perform the entire Tx band calibration
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 procedure has not been written yet. Instead we have the following two building
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 blocks:
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 fc-rfcal-txbasis performs the preliminary "basis" step of Tx power level
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 calibration: it sets the APC DAC to each of the values given on the command line
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 in turn, and reports the resulting output power level in dBm. The temporary
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 APC DAC values do get written into the Tx levels table in L1 (there is no other
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 way to set the APC DAC value for the active transmitter through Test Mode), but
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 the MISC_ENABLE command to save Tx calibration tables in FFS is NOT issued,
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 thus the corruption of the Tx levels table inflicted by this program will get
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 blown away on the next rfpw 7 (Test Mode band selection) command.
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 fc-rfcal-txcheck is a completely non-invasive program (does not make any writes
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 to any L1 RF tables or to FFS) that steps through all power levels for the
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 specified band (5-19 for EGSM or GSM850, or 0-15 for DCS or PCS), performs a
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 power measurement at each level, and displays the measured result. An
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 equivalent operation will be the finishing sanity check step in the full Tx
8e675142cca7 doc/Tx-cal-theory written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 power level calibration program.