FreeCalypso > hg > freecalypso-tools
comparison doc/RF_tables @ 148:0e7a85356130
doc/RF_tables write-up added
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 27 Feb 2017 08:34:31 +0000 |
parents | |
children | 158fef5f4b82 |
comparison
equal
deleted
inserted
replaced
147:d2a79b68789b | 148:0e7a85356130 |
---|---|
1 TI's TCS211 firmware for the Calypso+Iota+Rita chipset maintains a number of | |
2 tables for RF calibration and configuration. These tables can be saved in the | |
3 non-volatile flash file system (FFS), as normally required for per-unit RF | |
4 calibration; tables that are saved in FFS will be automatically read when the | |
5 firmware boots and whenever it switches between 900+1800 and 850+1900 MHz band | |
6 pairs. There is also a compiled-in default for each of the tables built into | |
7 the firmware image; these defaults are used whenever a given table is not found | |
8 in FFS. | |
9 | |
10 The firmware also provides Test Mode commands (accessed via the RVTMUX binary | |
11 packet interface) through which an external host can read and write the in-RAM | |
12 working copies of these RF calibration and configuration tables; the standard | |
13 expected workflow is as follows: | |
14 | |
15 * When the firmware first boots on a freshly manufactured board with a blank | |
16 FFS, the in-RAM working tables are loaded from the compiled-in defaults. | |
17 | |
18 * The factory production test and RF calibration station connects to the | |
19 running firmware via RVTMUX, and as it goes through the requisite calibration | |
20 steps, properly adjusted RF tables are formed in the firmware's working in-RAM | |
21 locations. | |
22 | |
23 * The production test and calibration station sends some special command packets | |
24 (encoded via the MISC_ENABLE opcode) to the firmware; these commands tell the | |
25 firmware to take the in-RAM RF tables and save them in the non-volatile FFS. | |
26 There are separate me commands for saving different groups of RF tables, | |
27 divided into RF calibration, RF config, Tx calibration, Tx config, | |
28 Rx calibration and Rx config. The tables in the Tx config and Rx config | |
29 groups are never modified in practice, hence they are usually not written | |
30 into FFS and the fw uses the compiled-in versions instead. | |
31 | |
32 * In normal operation the GSM device firmware reads the RF calibration and | |
33 configuration tables that have been written into FFS on the production line | |
34 and subsequently persist for the lifetime of the device. | |
35 | |
36 FreeCalypso tools provide the following support for working with these tables: | |
37 | |
38 * We have defined our own ASCII text-based format in which each of the RF tables | |
39 implemented by TCS211 fw can be represented. This text format is both human- | |
40 and machine-readable. | |
41 | |
42 * Our fc-tmsh utility (the tool that exchanges Test Mode command packets with | |
43 running firmwares) supports rftw and rftr commands for reading and writing | |
44 the fw's in-RAM RF tables via RF_TABLE_WRITE and RF_TABLE_READ command | |
45 packets. Our implementation of the rftw command takes the table data input | |
46 in the form of ASCII text files in our format, and the tables read back from | |
47 the fw via the rftr command can be written out into host files in the same | |
48 format. | |
49 | |
50 * RF tables that have been saved in the non-volatile FFS can be read out | |
51 "in vivo" via fc-fsio or "in vitro" from a raw flash dump via tiffs. They | |
52 are in the firmware's native binary format. Our fc-cal2text utility can be | |
53 used to convert these binary files into our adopted text format for easier | |
54 analysis. The conversion is lossless, but we do not currently have a utility | |
55 to perform the opposite conversion, as there does not appear to be a use case | |
56 for it. If such a use case does arise, it will be easy to construct the | |
57 appropriate tool(s). | |
58 | |
59 In the case of two particular RF tables there is a slight difference between | |
60 the way they are stored in FFS and the way they are read and written via Test | |
61 Mode commands: | |
62 | |
63 * The firmware maintains 3 separate tables for il2agc (input level to AGC) | |
64 conversion, to be used in different circumstances. As it happens, the | |
65 compiled-in default is the same for all 3 tables and these tables are never | |
66 changed in practice, but "by the book" they are still 3 separate tables. | |
67 In FFS all 3 tables are concatenated together in a single file | |
68 /gsm/rf/rx/il2agc, but for the rftw and rftr command packet exchanges they | |
69 are 3 separate tables. | |
70 | |
71 * For each supported frequency band there is a table of Tx power ramp-up and | |
72 ramp-down profiles. Each single ramp is 16 bytes, each ramp-up & ramp-down | |
73 pair is 32 bytes, and the firmware allows for 16 of these stored templates. | |
74 The complete table is stored in FFS as a single file of 512 bytes, but it is | |
75 too big for the TM3 protocol. Instead the Test Mode protocol provides | |
76 dedicated TX_TEMPLATE_WRITE (ttw) and TX_TEMPLATE_READ (ttr) commands which | |
77 write or read one 32-byte template at a time. | |
78 | |
79 The ASCII text file representation of the RF tables adopted in FreeCalypso | |
80 follows the Test Mode protocol model where it deviates from the FFS model: | |
81 fc-cal2text turns the /gsm/rf/tx/ramps.* file for each band into 16 individual | |
82 ramp files, and if there is a /gsm/rf/rx/il2agc file, it will be turned into | |
83 three separate il2agc-av, il2agc-max and il2agc-pwr table files. |