comparison doc/Compal-calibration @ 304:9c1444923495

doc/Compal-calibration: c1xx-calextr handles Rx calchan now
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 20 Nov 2017 16:24:22 +0000
parents e05563f0dfcf
children 3d79116be312
comparison
equal deleted inserted replaced
303:7de38a7e1fa5 304:9c1444923495
36 following: 36 following:
37 37
38 c1xx-calextr -b rfbin flashdump.bin 0x3FC000 38 c1xx-calextr -b rfbin flashdump.bin 0x3FC000
39 39
40 The c1xx-calextr utility locates the RF calibration records in the flash dump 40 The c1xx-calextr utility locates the RF calibration records in the flash dump
41 binary, extracts the specific calibration values of primary importance (Rx 41 binary, extracts those calibration values contained therein which we are able
42 "magic gain" and Tx APC DAC values), and converts them to TI's canonical format 42 to grok, and converts them to TI's canonical format for use with FreeCalypso
43 for use with FreeCalypso firmware. The numeric argument after the flash image 43 firmware. The numeric argument after the flash image filename is the offset
44 filename is the offset within that image file where the magic sector should be 44 within that image file where the magic sector should be sought, and the -b
45 sought, and the -b option directs the tool to save the converted RF calibration 45 option directs the tool to save the converted RF calibration tables in binary
46 tables in binary format (the alternative is -a for ASCII format) in the 46 format (the alternative is -a for ASCII format) in the directory named after
47 directory named after the option, named rfbin in this example. 47 the option, named rfbin in this example.
48 48
49 If you use the binary output option as recommended here, the resulting output 49 If you use the binary output option as recommended here, the resulting output
50 directory will have two subdirectories in it, named rx and tx. The rx 50 directory will have two subdirectories in it, named rx and tx. The rx
51 subdirectory will have two files named agcparams.BAND where BAND is 900 and 1800 51 subdirectory will contain agcparams and calchan tables for each band, and the
52 for EU-band phones or 850 and 1900 for US-band ones, and the tx subdirectory 52 tx subdirectory will contain a levels table for each band. This directory
53 will have two files named levels.BAND. This directory structure and these 53 structure and these names for the binary files correspond directly to the
54 names for the binary files correspond directly to the /gsm/rf directory subtree 54 /gsm/rf directory subtree in the flash file system (FFS) of TI's canonical
55 in the flash file system (FFS) of TI's canonical solution, hence once the C1xx 55 solution, hence once the C1xx phone in question is converted to FreeCalypso
56 phone in question is converted to FreeCalypso (i.e., runs FreeCalypso fw with 56 (i.e., runs FreeCalypso fw with an aftermarket FFS created for it), you can
57 an aftermarket FFS created for it), you can upload the extracted and converted 57 upload the extracted and converted RF calibration values into it like this:
58 RF calibration values into it like this:
59 58
60 fc-fsio upload-subtree rfbin /gsm/rf 59 fc-fsio upload-subtree rfbin /gsm/rf
61 60
62 Limitations 61 Rx channel correction values
63 =========== 62 ============================
64 63
65 In the traditional RF calibration procedure performed by most GSM phone and 64 A GSM phone or modem needs to know how to derive the actual input signal level
66 modem manufacturers including Motorola, the Rx "magic gain" and the Tx APC DAC 65 in dBm from the power measurements reported by the DSP; the difference between
67 values (Tx power levels) are calibrated for the center frequency of each band 66 the two is called the "magic gain" (GMagic), and the firmware needs to know
68 at first, and then additional measurements are performed at other frequencies 67 what it is. The primary GMagic value for each band is calibrated at the center
69 within the band to arrive at channel-dependent corrections for both Rx and Tx. 68 frequency of that band, and then there are channel-dependent corrections
70 On devices that follow TI's canonical way of doing things, you can find these 69 applied.
71 channel correction tables in /gsm/rf/rx/calchan.* and /gsm/rf/tx/calchan.* 70
72 files in the FFS. 71 In TI's canonical solution the complete ARFCN range of each band is divided
73 72 into up to 10 subbands, and each of these subbands gets its own channel
74 However, in the case of C1xx phones, Mot/Compal have changed the way in which 73 correction value. The ARFCN boundaries between the subbands are defined by the
75 they do these channel corrections (both Rx and Tx) from TI's canon, and the 74 external calibration system and not by the firmware code, by virtue of being
76 channel correction values stored in their factory calibration records do not 75 given inside the Rx calchan table itself along with the correction values.
77 naturally translate to TI's Rx calchan and Tx calchan tables. 76
78 77 But Motorola/Compal have made two changes:
79 In the case of Rx calibration, Mot/Compal have calibrated the channel 78
80 corrections with much finer granularity than is called for in TI's canonical 79 * They increased the number of subbands from 10 (TI's canon) to 21 for the
81 version. In TI's canon each band is divided into up to 10 subbands for the 80 GSM850 band, 30 for the EGSM band, 63 for DCS and 50 for PCS, so that each
82 purpose of Rx channel compensation, but Mot/Compal used much narrower subbands 81 subband is only 6 channels (1.2 MHz).
83 of only 6 ARFCNs each, resulting in 21 subbands in the narrowest GSM850 band 82
84 and 63 subbands in the widest DCS (1800 MHz) band. We can see where the 83 * The ARFCN boundaries for the subbands are not stored in the calibration
85 channel correction values for each of these tiny subbands are stored, but 84 records in the flash, but are fixed in the firmware instead.
86 making use of them in FreeCalypso is not easy. 85
86 Changing our FreeCalypso firmware to allow up to 63 Rx AGC subbands to match
87 Mot/Compal's fw would be too disruptive, hence our current c1xx-calextr
88 implementation translates Mot/Compal's Rx channel correction values to TI/FC
89 format by combining groups of Mot/Compal's subbands into larger subbands, and
90 making a mean value out of the smaller subband correction values in Mot/Compal's
91 factory calibration record.
92
93 The AGC subbands defined by Mot/Compal's fw are listed below, with each numeric
94 line giving the ARFCN range of each subband; blank lines separate the groupings
95 made by c1xx-calextr.
87 96
88 850 MHz band: 97 850 MHz band:
89 98
90 128-134 99 128-134
91 135-140 100 135-140
294 783-788 303 783-788
295 789-794 304 789-794
296 795-800 305 795-800
297 801-806 306 801-806
298 807-810 307 807-810
308
309 Tx channel correction values
310 ============================
311
312 A similar situation holds here: in TI's canon each band is divided into 8
313 subbands for the purpose of Tx channel-dependent corrections, but Mot/Compal
314 seem to be using smaller subbands: 13 for the GSM850 band, 18 for EGSM, 38 for
315 DCS and 30 for PCS. We can see where these correction values are stored in the
316 calibration records in the flash (immediately after the Tx levels array), but
317 the ARFCN boundaries of Mot/Compal's Tx channel calibration subbands are not
318 known, and the semantics of the correction values themselves are not clear:
319 Mot/Compal's Tx channel correction values are centered around 0, whereas in
320 TI's canonical version they are centered around 128.
321
322 Because we are not able to grok Mot/Compal's Tx channel correction, we currently
323 ignore this part of their factory calibration, i.e., FreeCalypso fw will run
324 with all channel correction values set to 128, meaning no channel correction.
325 But since we do use the Tx levels table of APC DAC values from Mot/Compal's
326 factory records, and given that the tolerances for Tx power levels given in the
327 GSM 05.05 spec are quite generous, we expect to still be within these tolerances
328 despite the lack of channel correction.