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