comparison gsm-fw/L1/cust0/mv100/l1_rf10.c @ 517:eafadfee35b2

gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Thu, 10 Jul 2014 03:43:04 +0000
parents
children
comparison
equal deleted inserted replaced
516:78495749970a 517:eafadfee35b2
1 T_RF rf =
2 {
3 RF_PASCAL_20, //RF revision
4 RF_HW_BAND_SUPPORT, // radio_band_support E-GSM/DCS
5
6 { //RX structure
7 { //AGC structure
8 140, // low_agc_noise_thr;
9 110, // high_agc_sat_thr;
10 6, // low_agc;
11 34, // high_agc;
12 //IL2AGC tables
13 { // below is: il2agc_pwr[121];
14 // il2agc_max[121];
15 // il2agc_av[121];
16 // il2agc_pwr
17 // Note this is shared between PCN and EGSM.
18
19 6, /* EGSM_MAX IL=0 */
20 6, /* EGSM_MAX IL=-1 */
21 6, /* EGSM_MAX IL=-2 */
22 6, /* EGSM_MAX IL=-3 */
23 6, /* EGSM_MAX IL=-4 */
24 6, /* EGSM_MAX IL=-5 */
25 6, /* EGSM_MAX IL=-6 */
26 6, /* EGSM_MAX IL=-7 */
27 6, /* EGSM_MAX IL=-8 */
28 6, /* EGSM_MAX IL=-9 */
29 6, /* EGSM_MAX IL=-10 */
30 6, /* EGSM_MAX IL=-11 */
31 6, /* EGSM_MAX IL=-12 */
32 6, /* EGSM_MAX IL=-13 */
33 6, /* EGSM_MAX IL=-14 */
34 6, /* EGSM_MAX IL=-15 */
35 6, /* EGSM_MAX IL=-16 */
36 6, /* EGSM_MAX IL=-17 */
37 6, /* EGSM_MAX IL=-18 */
38 6, /* EGSM_MAX IL=-19 */
39 6, /* EGSM_MAX IL=-20 */
40 6, /* EGSM_MAX IL=-21 */
41 6, /* EGSM_MAX IL=-22 */
42 6, /* EGSM_MAX IL=-23 */
43 6, /* EGSM_MAX IL=-24 */
44 6, /* EGSM_MAX IL=-25 */
45 6, /* EGSM_MAX IL=-26 */
46 6, /* EGSM_MAX IL=-27 */
47 6, /* EGSM_MAX IL=-28 */
48 6, /* EGSM_MAX IL=-29 */
49 6, /* EGSM_MAX IL=-30 */
50 6, /* EGSM_MAX IL=-31 */
51 6, /* EGSM_MAX IL=-32 */
52 6, /* EGSM_MAX IL=-33 */
53 6, /* EGSM_MAX IL=-34 */
54 6, /* EGSM_MAX IL=-35 */
55 6, /* EGSM_MAX IL=-36 */
56 6, /* EGSM_MAX IL=-37 */
57 6, /* EGSM_MAX IL=-38 */
58 6, /* EGSM_MAX IL=-39 */
59 6, /* EGSM_MAX IL=-40 */
60 6, /* EGSM_MAX IL=-41 */
61 6, /* EGSM_MAX IL=-42 */
62 6, /* EGSM_MAX IL=-43 */
63 6, /* EGSM_MAX IL=-44 */
64 6, /* EGSM_MAX IL=-45 */
65 6, /* EGSM_MAX IL=-46 */
66 6, /* EGSM_MAX IL=-47 */
67 8, /* EGSM_MAX IL=-48 */
68 8, /* EGSM_MAX IL=-49 */
69 10, /* EGSM_MAX IL=-50 */
70 10, /* EGSM_MAX IL=-51 */
71 12, /* EGSM_MAX IL=-52 */
72 12, /* EGSM_MAX IL=-53 */
73 14, /* EGSM_MAX IL=-54 */
74 14, /* EGSM_MAX IL=-55 */
75 16, /* EGSM_MAX IL=-56 */
76 16, /* EGSM_MAX IL=-57 */
77 18, /* EGSM_MAX IL=-58 */
78 18, /* EGSM_MAX IL=-59 */
79 20, /* EGSM_MAX IL=-60 */
80 20, /* EGSM_MAX IL=-61 */
81 22, /* EGSM_MAX IL=-62 */
82 22, /* EGSM_MAX IL=-63 */
83 24, /* EGSM_MAX IL=-64 */
84 24, /* EGSM_MAX IL=-65 */
85 26, /* EGSM_MAX IL=-66 */
86 26, /* EGSM_MAX IL=-67 */
87 28, /* EGSM_MAX IL=-68 */
88 28, /* EGSM_MAX IL=-69 */
89 30, /* EGSM_MAX IL=-70 */
90 30, /* EGSM_MAX IL=-71 */
91 32, /* EGSM_MAX IL=-72 */
92 32, /* EGSM_MAX IL=-73 */
93 34, /* EGSM_MAX IL=-74 */
94 34, /* EGSM_MAX IL=-75 */
95 36, /* EGSM_MAX IL=-76 */
96 36, /* EGSM_MAX IL=-77 */
97 38, /* EGSM_MAX IL=-78 */
98 38, /* EGSM_MAX IL=-79 */
99 40, /* EGSM_MAX IL=-80 */
100 40, /* EGSM_MAX IL=-81 */
101 42, /* EGSM_MAX IL=-82 */
102 42, /* EGSM_MAX IL=-83 */
103 44, /* EGSM_MAX IL=-84 */
104 44, /* EGSM_MAX IL=-85 */
105 46, /* EGSM_MAX IL=-86 */
106 46, /* EGSM_MAX IL=-87 */
107 48, /* EGSM_MAX IL=-88 */
108 48, /* EGSM_MAX IL=-89 */
109 50, /* EGSM_MAX IL=-90 */
110 50, /* EGSM_MAX IL=-91 */
111 50, /* EGSM_MAX IL=-92 */
112 50, /* EGSM_MAX IL=-93 */
113 50, /* EGSM_MAX IL=-94 */
114 50, /* EGSM_MAX IL=-95 */
115 50, /* EGSM_MAX IL=-96 */
116 50, /* EGSM_MAX IL=-97 */
117 50, /* EGSM_MAX IL=-98 */
118 50, /* EGSM_MAX IL=-99 */
119 50, /* EGSM_MAX IL=-100 */
120 50, /* EGSM_MAX IL=-101 */
121 50, /* EGSM_MAX IL=-102 */
122 50, /* EGSM_MAX IL=-103 */
123 50, /* EGSM_MAX IL=-104 */
124 50, /* EGSM_MAX IL=-105 */
125 50, /* EGSM_MAX IL=-106 */
126 50, /* EGSM_MAX IL=-107 */
127 50, /* EGSM_MAX IL=-108 */
128 50, /* EGSM_MAX IL=-109 */
129 50, /* EGSM_MAX IL=-110 */
130 50, /* EGSM_MAX IL=-111 */
131 50, /* EGSM_MAX IL=-112 */
132 50, /* EGSM_MAX IL=-113 */
133 50, /* EGSM_MAX IL=-114 */
134 50, /* EGSM_MAX IL=-115 */
135 50, /* EGSM_MAX IL=-116 */
136 50, /* EGSM_MAX IL=-117 */
137 50, /* EGSM_MAX IL=-118 */
138 50, /* EGSM_MAX IL=-119 */
139 50 /* EGSM_MAX IL=-120 */
140 },
141 { // il2agc_max
142 // Note this is shared between PCN and EGSM.
143 6, /* EGSM_MAX IL=0 */
144 6, /* EGSM_MAX IL=-1 */
145 6, /* EGSM_MAX IL=-2 */
146 6, /* EGSM_MAX IL=-3 */
147 6, /* EGSM_MAX IL=-4 */
148 6, /* EGSM_MAX IL=-5 */
149 6, /* EGSM_MAX IL=-6 */
150 6, /* EGSM_MAX IL=-7 */
151 6, /* EGSM_MAX IL=-8 */
152 6, /* EGSM_MAX IL=-9 */
153 6, /* EGSM_MAX IL=-10 */
154 6, /* EGSM_MAX IL=-11 */
155 6, /* EGSM_MAX IL=-12 */
156 6, /* EGSM_MAX IL=-13 */
157 6, /* EGSM_MAX IL=-14 */
158 6, /* EGSM_MAX IL=-15 */
159 6, /* EGSM_MAX IL=-16 */
160 6, /* EGSM_MAX IL=-17 */
161 6, /* EGSM_MAX IL=-18 */
162 6, /* EGSM_MAX IL=-19 */
163 6, /* EGSM_MAX IL=-20 */
164 6, /* EGSM_MAX IL=-21 */
165 6, /* EGSM_MAX IL=-22 */
166 6, /* EGSM_MAX IL=-23 */
167 6, /* EGSM_MAX IL=-24 */
168 6, /* EGSM_MAX IL=-25 */
169 6, /* EGSM_MAX IL=-26 */
170 6, /* EGSM_MAX IL=-27 */
171 6, /* EGSM_MAX IL=-28 */
172 6, /* EGSM_MAX IL=-29 */
173 6, /* EGSM_MAX IL=-30 */
174 6, /* EGSM_MAX IL=-31 */
175 6, /* EGSM_MAX IL=-32 */
176 6, /* EGSM_MAX IL=-33 */
177 6, /* EGSM_MAX IL=-34 */
178 6, /* EGSM_MAX IL=-35 */
179 6, /* EGSM_MAX IL=-36 */
180 6, /* EGSM_MAX IL=-37 */
181 6, /* EGSM_MAX IL=-38 */
182 6, /* EGSM_MAX IL=-39 */
183 6, /* EGSM_MAX IL=-40 */
184 6, /* EGSM_MAX IL=-41 */
185 6, /* EGSM_MAX IL=-42 */
186 6, /* EGSM_MAX IL=-43 */
187 6, /* EGSM_MAX IL=-44 */
188 6, /* EGSM_MAX IL=-45 */
189 6, /* EGSM_MAX IL=-46 */
190 6, /* EGSM_MAX IL=-47 */
191 8, /* EGSM_MAX IL=-48 */
192 8, /* EGSM_MAX IL=-49 */
193 10, /* EGSM_MAX IL=-50 */
194 10, /* EGSM_MAX IL=-51 */
195 12, /* EGSM_MAX IL=-52 */
196 12, /* EGSM_MAX IL=-53 */
197 14, /* EGSM_MAX IL=-54 */
198 14, /* EGSM_MAX IL=-55 */
199 16, /* EGSM_MAX IL=-56 */
200 16, /* EGSM_MAX IL=-57 */
201 18, /* EGSM_MAX IL=-58 */
202 18, /* EGSM_MAX IL=-59 */
203 20, /* EGSM_MAX IL=-60 */
204 20, /* EGSM_MAX IL=-61 */
205 22, /* EGSM_MAX IL=-62 */
206 22, /* EGSM_MAX IL=-63 */
207 24, /* EGSM_MAX IL=-64 */
208 24, /* EGSM_MAX IL=-65 */
209 26, /* EGSM_MAX IL=-66 */
210 26, /* EGSM_MAX IL=-67 */
211 28, /* EGSM_MAX IL=-68 */
212 28, /* EGSM_MAX IL=-69 */
213 30, /* EGSM_MAX IL=-70 */
214 30, /* EGSM_MAX IL=-71 */
215 32, /* EGSM_MAX IL=-72 */
216 32, /* EGSM_MAX IL=-73 */
217 34, /* EGSM_MAX IL=-74 */
218 34, /* EGSM_MAX IL=-75 */
219 36, /* EGSM_MAX IL=-76 */
220 36, /* EGSM_MAX IL=-77 */
221 38, /* EGSM_MAX IL=-78 */
222 38, /* EGSM_MAX IL=-79 */
223 40, /* EGSM_MAX IL=-80 */
224 40, /* EGSM_MAX IL=-81 */
225 42, /* EGSM_MAX IL=-82 */
226 42, /* EGSM_MAX IL=-83 */
227 44, /* EGSM_MAX IL=-84 */
228 44, /* EGSM_MAX IL=-85 */
229 46, /* EGSM_MAX IL=-86 */
230 46, /* EGSM_MAX IL=-87 */
231 48, /* EGSM_MAX IL=-88 */
232 48, /* EGSM_MAX IL=-89 */
233 50, /* EGSM_MAX IL=-90 */
234 50, /* EGSM_MAX IL=-91 */
235 50, /* EGSM_MAX IL=-92 */
236 50, /* EGSM_MAX IL=-93 */
237 50, /* EGSM_MAX IL=-94 */
238 50, /* EGSM_MAX IL=-95 */
239 50, /* EGSM_MAX IL=-96 */
240 50, /* EGSM_MAX IL=-97 */
241 50, /* EGSM_MAX IL=-98 */
242 50, /* EGSM_MAX IL=-99 */
243 50, /* EGSM_MAX IL=-100 */
244 50, /* EGSM_MAX IL=-101 */
245 50, /* EGSM_MAX IL=-102 */
246 50, /* EGSM_MAX IL=-103 */
247 50, /* EGSM_MAX IL=-104 */
248 50, /* EGSM_MAX IL=-105 */
249 50, /* EGSM_MAX IL=-106 */
250 50, /* EGSM_MAX IL=-107 */
251 50, /* EGSM_MAX IL=-108 */
252 50, /* EGSM_MAX IL=-109 */
253 50, /* EGSM_MAX IL=-110 */
254 50, /* EGSM_MAX IL=-111 */
255 50, /* EGSM_MAX IL=-112 */
256 50, /* EGSM_MAX IL=-113 */
257 50, /* EGSM_MAX IL=-114 */
258 50, /* EGSM_MAX IL=-115 */
259 50, /* EGSM_MAX IL=-116 */
260 50, /* EGSM_MAX IL=-117 */
261 50, /* EGSM_MAX IL=-118 */
262 50, /* EGSM_MAX IL=-119 */
263 50 /* EGSM_MAX IL=-120 */
264 },
265 { // il2agc_av
266 // Note this is shared between PCN and EGSM.
267 6, /* EGSM_AV IL=0 */
268 6, /* EGSM_AV IL=-1 */
269 6, /* EGSM_AV IL=-2 */
270 6, /* EGSM_AV IL=-3 */
271 6, /* EGSM_AV IL=-4 */
272 6, /* EGSM_AV IL=-5 */
273 6, /* EGSM_AV IL=-6 */
274 6, /* EGSM_AV IL=-7 */
275 6, /* EGSM_AV IL=-8 */
276 6, /* EGSM_AV IL=-9 */
277 6, /* EGSM_AV IL=-10 */
278 6, /* EGSM_AV IL=-11 */
279 6, /* EGSM_AV IL=-12 */
280 6, /* EGSM_AV IL=-13 */
281 6, /* EGSM_AV IL=-14 */
282 6, /* EGSM_AV IL=-15 */
283 6, /* EGSM_AV IL=-16 */
284 6, /* EGSM_AV IL=-17 */
285 6, /* EGSM_AV IL=-18 */
286 6, /* EGSM_AV IL=-19 */
287 6, /* EGSM_AV IL=-20 */
288 6, /* EGSM_AV IL=-21 */
289 6, /* EGSM_AV IL=-22 */
290 6, /* EGSM_AV IL=-23 */
291 6, /* EGSM_AV IL=-24 */
292 6, /* EGSM_AV IL=-25 */
293 6, /* EGSM_AV IL=-26 */
294 6, /* EGSM_AV IL=-27 */
295 6, /* EGSM_AV IL=-28 */
296 6, /* EGSM_AV IL=-29 */
297 6, /* EGSM_AV IL=-30 */
298 6, /* EGSM_AV IL=-31 */
299 6, /* EGSM_AV IL=-32 */
300 6, /* EGSM_AV IL=-33 */
301 6, /* EGSM_AV IL=-34 */
302 6, /* EGSM_AV IL=-35 */
303 6, /* EGSM_AV IL=-36 */
304 6, /* EGSM_AV IL=-37 */
305 6, /* EGSM_AV IL=-38 */
306 6, /* EGSM_AV IL=-39 */
307 6, /* EGSM_AV IL=-40 */
308 6, /* EGSM_AV IL=-41 */
309 6, /* EGSM_AV IL=-42 */
310 6, /* EGSM_AV IL=-43 */
311 6, /* EGSM_AV IL=-44 */
312 6, /* EGSM_AV IL=-45 */
313 6, /* EGSM_AV IL=-46 */
314 6, /* EGSM_AV IL=-47 */
315 8, /* EGSM_AV IL=-48 */
316 8, /* EGSM_AV IL=-49 */
317 10, /* EGSM_AV IL=-50 */
318 10, /* EGSM_AV IL=-51 */
319 12, /* EGSM_AV IL=-52 */
320 12, /* EGSM_AV IL=-53 */
321 14, /* EGSM_AV IL=-54 */
322 14, /* EGSM_AV IL=-55 */
323 16, /* EGSM_AV IL=-56 */
324 16, /* EGSM_AV IL=-57 */
325 18, /* EGSM_AV IL=-58 */
326 18, /* EGSM_AV IL=-59 */
327 20, /* EGSM_AV IL=-60 */
328 20, /* EGSM_AV IL=-61 */
329 22, /* EGSM_AV IL=-62 */
330 22, /* EGSM_AV IL=-63 */
331 24, /* EGSM_AV IL=-64 */
332 24, /* EGSM_AV IL=-65 */
333 26, /* EGSM_AV IL=-66 */
334 26, /* EGSM_AV IL=-67 */
335 28, /* EGSM_AV IL=-68 */
336 28, /* EGSM_AV IL=-69 */
337 30, /* EGSM_AV IL=-70 */
338 30, /* EGSM_AV IL=-71 */
339 32, /* EGSM_AV IL=-72 */
340 32, /* EGSM_AV IL=-73 */
341 34, /* EGSM_AV IL=-74 */
342 34, /* EGSM_AV IL=-75 */
343 36, /* EGSM_AV IL=-76 */
344 36, /* EGSM_AV IL=-77 */
345 38, /* EGSM_AV IL=-78 */
346 38, /* EGSM_AV IL=-79 */
347 40, /* EGSM_AV IL=-80 */
348 40, /* EGSM_AV IL=-81 */
349 42, /* EGSM_AV IL=-82 */
350 42, /* EGSM_AV IL=-83 */
351 44, /* EGSM_AV IL=-84 */
352 44, /* EGSM_AV IL=-85 */
353 46, /* EGSM_AV IL=-86 */
354 46, /* EGSM_AV IL=-87 */
355 48, /* EGSM_AV IL=-88 */
356 48, /* EGSM_AV IL=-89 */
357 50, /* EGSM_AV IL=-90 */
358 50, /* EGSM_AV IL=-91 */
359 50, /* EGSM_AV IL=-92 */
360 50, /* EGSM_AV IL=-93 */
361 50, /* EGSM_AV IL=-94 */
362 50, /* EGSM_AV IL=-95 */
363 50, /* EGSM_AV IL=-96 */
364 50, /* EGSM_AV IL=-97 */
365 50, /* EGSM_AV IL=-98 */
366 50, /* EGSM_AV IL=-99 */
367 50, /* EGSM_AV IL=-100 */
368 50, /* EGSM_AV IL=-101 */
369 50, /* EGSM_AV IL=-102 */
370 50, /* EGSM_AV IL=-103 */
371 50, /* EGSM_AV IL=-104 */
372 50, /* EGSM_AV IL=-105 */
373 50, /* EGSM_AV IL=-106 */
374 50, /* EGSM_AV IL=-107 */
375 50, /* EGSM_AV IL=-108 */
376 50, /* EGSM_AV IL=-109 */
377 50, /* EGSM_AV IL=-110 */
378 50, /* EGSM_AV IL=-111 */
379 50, /* EGSM_AV IL=-112 */
380 50, /* EGSM_AV IL=-113 */
381 50, /* EGSM_AV IL=-114 */
382 50, /* EGSM_AV IL=-115 */
383 50, /* EGSM_AV IL=-116 */
384 50, /* EGSM_AV IL=-117 */
385 50, /* EGSM_AV IL=-118 */
386 50, /* EGSM_AV IL=-119 */
387 50 /* EGSM_AV IL=-120 */
388 }
389 },
390 },
391 {
392 {0, 0}, // ramp up and down delays
393 GUARD_BITS, // number of guard bits needed for ramp up
394 PRG_TX // propagation delay PRG_TX
395 },
396 { //AFC parameters
397 EEPROM_AFC,
398 C_Psi_sta_inv, // (1/C_Psi_sta)
399 C_Psi_st, // C_Psi_sta * 0.8 F0.16
400 C_Psi_st_32, // F0.32
401 C_Psi_st_inv // (1/C_Psi_st)
402
403 #if (VCXO_ALGO == 1)
404 ,C_AFC_DAC_CENTER, // VCXO startup parameter - best guess
405 C_AFC_DAC_MIN, // VCXO startup parameter - 15ppm
406 C_AFC_DAC_MAX, // VCXO startup parameter + 15ppm
407 C_AFC_SNR_THR // snr - Default threshold value
408 #endif
409 }
410 };
411
412 T_RF_BAND rf_band[GSM_BANDS]; //uninitialised rf struct for bands
413
414 const T_RF_BAND rf_900 =
415 {
416 { //RX structure
417 //T_RX_CAL_PARAMS rx_cal_params
418 {
419 193, //g_magic
420 40, //lna_gain_max * 2
421 40, //lna_th_high
422 44 //lna_th_low
423 },
424 { //T_RF_AGC_BAND agc_bands[RF_RX_CAL_CHAN_SIZE];
425 // Remark: ARFCN=0 (GSM-E) is maintained by 1st GSM subbband.
426 // upper_bound, agc_calib
427 { 10, 1}, // sub-band1 up to arfcn = 10, Agc calibration = 0db
428 { 30, 1}, // sub-band2 up to arfcn = 30, Agc calibration = 0db
429 { 51, 0}, // sub-band3 up to arfcn = 51, Agc calibration = 0db
430 { 71, 0}, // etc.
431 { 90, 1}, //
432 { 112, 1}, //
433 { 124, 2}, //
434 { 991, 3}, //
435 {1009, 2}, //
436 {1023, 1}, //
437 },
438 { //RX temperature compensation
439 { -15 , 0 },
440 { -5 , 0 },
441 { 6 , 0 },
442 { 16 , 0 },
443 { 25 , 0 },
444 { 35 , 0 },
445 { 45 , 0 },
446 { 56 , 0 },
447 { 66 , 0 },
448 { 75 , 0 },
449 { 100 , 0 }
450 }
451 },
452 { //TX structure
453 {// gsm900 T_LEVEL_TX
454 { 510, 0, 0 }, // 0
455 { 510, 0, 0 }, // 1
456 { 510, 0, 0 }, // 2
457 { 510, 0, 0 }, // 3
458 { 510, 0, 0 }, // 4
459 { 510, 0, 0 }, // 5
460 { 449, 1, 0 }, // 6
461 { 361, 2, 0 }, // 7
462 { 291, 3, 0 }, // 8
463 { 236, 4, 0 }, // 9
464 { 192, 5, 0 }, // 10
465 { 157, 6, 0 }, // 11
466 { 130, 7, 0 }, // 12
467 { 107, 8, 0 }, // 13
468 { 86, 9, 0 }, // 14
469 { 71, 10, 0 }, // 15
470 { 61, 11, 0 }, // 16
471 { 52, 12, 0 }, // 17
472 { 47, 13, 0 }, // 18
473 { 43, 14, 0 }, // 19
474 { 43, 14, 0 }, // 20
475 { 43, 14, 0 }, // 21
476 { 43, 14, 0 }, // 22
477 { 43, 14, 0 }, // 23
478 { 43, 14, 0 }, // 24
479 { 43, 14, 0 }, // 25
480 { 43, 14, 0 }, // 26
481 { 43, 14, 0 }, // 27
482 { 43, 14, 0 }, // 28
483 { 43, 14, 0 }, // 29
484 { 43, 14, 0 }, // 30
485 { 43, 14, 0 }, // 31
486 },
487 {// Channel Calibration Talbles
488 {// arfcn, tx_chan_cal
489 { 27, 126 }, // Calibration Table 0
490 { 47, 128 },
491 { 66, 129 },
492 { 85, 129 },
493 { 104, 133 },
494 { 124, 133 },
495 { 994, 125 },
496 { 1023, 125 }
497 },
498 {// arfcn, tx_chan_cal
499 { 27, 128 }, // Calibration Table 1
500 { 47, 128 },
501 { 66, 128 },
502 { 85, 128 },
503 { 104, 128 },
504 { 124, 128 },
505 { 994, 128 },
506 { 1023, 128 }
507 },
508 {// arfcn, tx_chan_cal
509 { 27, 128 }, // Calibration Table 2
510 { 47, 128 },
511 { 66, 128 },
512 { 85, 128 },
513 { 104, 128 },
514 { 124, 128 },
515 { 994, 128 },
516 { 1023, 128 }
517 },
518 {// arfcn, tx_chan_cal
519 { 27, 128 }, // Calibration Table 3
520 { 47, 128 },
521 { 66, 128 },
522 { 85, 128 },
523 { 104, 128 },
524 { 124, 128 },
525 { 994, 128 },
526 { 1023, 128 }
527 }
528 },
529 { // GSM Power Ramp Values
530 {
531 {// Ramp-Up #0 profile - Power Level 5
532 0,0,0,0,0,0,0,0,0,10,31,31,31,15,10,0
533 },
534 {// Ramp-Down #0 profile
535 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
536 },
537 },
538 {
539 {// Ramp-Up #1 profile - Power Level 6
540 0,0,0,0,0,0,0,0,0,10,31,31,31,15,10,0
541 },
542 {// Ramp-Down #1 profile
543 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
544 },
545 },
546 {
547 {// Ramp-Up #2 profile - Power Level 7
548 0,0,0,0,0,0,0,0,0,6,19,31,31,31,10,0
549 },
550 {// Ramp-Down #2 profile
551 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
552 },
553 },
554 {
555 {// Ramp-Up #3 profile - Power Level 8
556 0,0,0,0,0,0,0,0,0,6,19,31,31,31,10,0
557 },
558 {// Ramp-Down #3 profile
559 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
560 },
561 },
562 {
563 {// Ramp-Up #4 profile - Power Level 9
564 0,0,0,0,0,0,0,0,0,9,16,31,31,31,10,0
565 },
566 {// Ramp-Down #4 profile
567 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
568 },
569 },
570 {
571 {// Ramp-Up #5 profile - Power Level 10
572 0,0,0,0,0,0,0,0,0,9,16,31,31,31,10,0
573 },
574 {// Ramp-Down #5 profile
575 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
576 },
577 },
578 {
579 {// Ramp-Up #6 profile - Power Level 11
580 0,0,0,0,0,0,0,0,0,9,16,31,31,31,10,0
581 },
582 {// Ramp-Down #6 profile
583 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
584 },
585 },
586 {
587 {// Ramp-Up #7 profile - Power Level 12
588 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
589 },
590 {// Ramp-Down #7 profile
591 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
592 },
593 },
594 {
595 {// Ramp-Up #8 profile - Power Level 13
596 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
597 },
598 {// Ramp-Down #8 profile
599 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
600 },
601 },
602 {
603 {// Ramp-Up #9 profile - Power Level 14
604 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
605 },
606 {// Ramp-Down #9 profile
607 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
608 },
609 },
610 {
611 {// Ramp-Up #10 profile - Power Level 15
612 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
613 },
614 {// Ramp-Down #10 profile
615 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
616 },
617 },
618 {
619 {// Ramp-Up #11 profile - Power Level 16
620 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
621 },
622 {// Ramp-Down #11 profile
623 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
624 },
625 },
626 {
627 {// Ramp-Up #12 profile - Power Level 17
628 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
629 },
630 {// Ramp-Down #12 profile
631 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
632 },
633 },
634 {
635 {// Ramp-Up #13 profile - Power Level 18
636 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
637 },
638 {// Ramp-Down #13 profile
639 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
640 },
641 },
642 {
643 {// Ramp-Up #14 profile - Power Level 19
644 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
645 },
646 {// Ramp-Down #14 profile
647 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
648 },
649 },
650 {
651 {// Ramp-Up #15 profile - Power Level 19
652 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
653 },
654 {// Ramp-Down #15 profile
655 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
656 }
657 }
658 },
659 { //TX temperature compensation
660 #if (ORDER2_TX_TEMP_CAL==1)
661 { -11, 0, 0, 0 },
662 { +9, 0, 0, 0 },
663 { +39, 0, 0, 0 },
664 { +59, 0, 0, 0 },
665 { 127, 0, 0, 0 }
666 #else
667 { -11, 0 },
668 { +9, 0 },
669 { +39, 0 },
670 { +59, 0 },
671 { 127, 0 }
672 #endif
673 },
674 },
675 //IQ swap
676 SWAP_IQ_GSM,
677 };
678
679 const T_RF_BAND rf_1800 =
680 {
681 { //RX structure
682 { //T_RX_CAL_PARAMS rx_cal_params
683 188, //g_magic
684 40, //lna gain * 2
685 40, //lna_th_high
686 44 //lna_th_low
687 },
688 { //T_RF_AGC_BAND agc_bands[RF_RX_CAL_CHAN_SIZE];
689 /*--------------*/
690 /*-- DCS band --*/
691 /*--------------*/
692 {548, 0}, //
693 {622, 1}, //
694 {680, 0}, //
695 {745, 0}, //
696 {812, 0}, //
697 {860, 0}, //
698 {885, 2}, //
699 { 991, 0}, //
700 { 992, 0}, //
701 {1023, 0}, //
702 },
703 { //RX temperature compensation
704 { -15 , 0 },
705 { -5 , 0 },
706 { 6 , 0 },
707 { 16 , 0 },
708 { 25 , 0 },
709 { 35 , 0 },
710 { 45 , 0 },
711 { 56 , 0 },
712 { 66 , 0 },
713 { 75 , 0 },
714 { 100 , 0 }
715 }
716 },
717 { //TX structure
718 {// dcs1800 T_LEVEL_TX
719 { 463, 0, 0 }, // 0
720 { 376, 1, 0 }, // 1
721 { 309, 2, 0 }, // 2
722 { 255, 3, 0 }, // 3
723 { 211, 4, 0 }, // 4
724 { 176, 5, 0 }, // 5
725 { 146, 6, 0 }, // 6
726 { 122, 7, 0 }, // 7
727 { 99, 8, 0 }, // 8
728 { 83, 9, 0 }, // 9
729 { 70, 10, 0 }, // 10
730 { 58, 11, 0 }, // 11
731 { 47, 12, 0 }, // 12
732 { 38, 13, 0 }, // 13
733 { 32, 14, 0 }, // 14
734 { 26, 15, 0 }, // 15
735 { 26, 15, 0 }, // 16
736 { 26, 15, 0 }, // 17
737 { 26, 15, 0 }, // 18
738 { 26, 15, 0 }, // 19
739 { 26, 15, 0 }, // 20
740 { 26, 15, 0 }, // 21
741 { 26, 15, 0 }, // 22
742 { 26, 15, 0 }, // 23
743 { 26, 15, 0 }, // 24
744 { 26, 15, 0 }, // 25
745 { 26, 15, 0 }, // 26
746 { 26, 15, 0 }, // 27
747 { 26, 15, 0 }, // 28
748 { 463, 0, 0 }, // 29
749 { 463, 0, 0 }, // 30
750 { 463, 0, 0 }, // 31
751 },
752 {// Channel Calibration Talbles
753 {// arfcn, tx_chan_cal
754 { 553, 128 }, // Calibration Table 0
755 { 594, 128 },
756 { 636, 128 },
757 { 677, 128 },
758 { 720, 128 },
759 { 760, 128 },
760 { 802, 127 },
761 { 885, 127 }
762 },
763 {
764 { 553, 128 }, // Calibration Table 1
765 { 594, 128 },
766 { 636, 128 },
767 { 677, 128 },
768 { 720, 128 },
769 { 760, 128 },
770 { 802, 128 },
771 { 885, 128 }
772 },
773 {// arfcn, tx_chan_cal
774 { 553, 128 }, // Calibration Table 2
775 { 594, 128 },
776 { 636, 128 },
777 { 677, 128 },
778 { 720, 128 },
779 { 760, 128 },
780 { 802, 128 },
781 { 885, 128 }
782 },
783 {// arfcn, tx_chan_cal
784 { 553, 128 }, // Calibration Table 3
785 { 594, 128 },
786 { 636, 128 },
787 { 677, 128 },
788 { 720, 128 },
789 { 760, 128 },
790 { 802, 128 },
791 { 885, 128 }
792 }
793 },
794 { // DCS Power Ramp Values
795 {
796 {// Ramp-Up #0 profile - Power Level 0
797 0,0,0,0,0,0,0,0,0,5,20,31,31,31,10,0
798 },
799 {// Ramp-Down #0 profile
800 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
801 },
802 },
803 {
804 {// Ramp-Up #1 profile - Power Level 1
805 0,0,0,0,0,0,0,0,0,5,20,31,31,31,10,0
806 },
807 {// Ramp-Down #1 profile
808 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
809 },
810 },
811 {
812 {// Ramp-Up #2 profile - Power Level 2
813 0,0,0,0,0,0,0,0,0,5,20,31,31,31,10,0
814 },
815 {// Ramp-Down #2 profile
816 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
817 },
818 },
819 {
820 {// Ramp-Up #3 profile - Power Level 3
821 0,0,0,0,0,0,0,0,0,5,20,31,31,31,10,0
822 },
823 {// Ramp-Down #3 profile
824 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
825 },
826 },
827 {
828 {// Ramp-Up #4 profile - Power Level 4
829 0,0,0,0,0,0,0,0,0,5,20,31,31,31,10,0
830 },
831 {// Ramp-Down #4 profile
832 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
833 },
834 },
835 {
836 {// Ramp-Up #5 profile - Power Level 5
837 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
838 },
839 {// Ramp-Down #5 profile
840 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
841 },
842 },
843 {
844 {// Ramp-Up #6 profile - Power Level 6
845 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
846 },
847 {// Ramp-Down #6 profile
848 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
849 },
850 },
851 {
852 {// Ramp-Up #7 profile - Power Level 7
853 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
854 },
855 {// Ramp-Down #7 profile
856 0 ,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
857 },
858 },
859 {
860 {// Ramp-Up #8 profile - Power Level 8
861 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
862 },
863 {// Ramp-Down #8 profile
864 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
865 },
866 },
867 {
868 {// Ramp-Up #9 profile - Power Level 9
869 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
870 },
871 {// Ramp-Down #9 profile
872 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
873 },
874 },
875 {
876 {// Ramp-Up #10 profile - Power Level 10
877 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
878 },
879 {// Ramp-Down #10 profile
880 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
881 },
882 },
883 {
884 {// Ramp-Up #11 profile - Power Level 11
885 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
886 },
887 {// Ramp-Down #11 profile
888 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
889 },
890 },
891 {
892 {// Ramp-Up #12 profile - Power Level 12
893 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
894 },
895 {// Ramp-Down #12 profile
896 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
897 },
898 },
899 {
900 {// Ramp-Up #13 profile - Power Level 13
901 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
902 },
903 {// Ramp-Down #13 profile
904 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
905 },
906 },
907 {
908 {// Ramp-Up #14 profile - Power Level 14
909 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
910 },
911 {// Ramp-Down #14 profile
912 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
913 },
914 },
915 {
916 {// Ramp-Up #15 profile - Power Level 15
917 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
918 },
919 {// Ramp-Down #15 profile
920 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
921 },
922 },
923 },
924 { //TX temperature compensation
925 #if (ORDER2_TX_TEMP_CAL==1)
926 { -11, 0, 0, 0 },
927 { +9, 0, 0, 0 },
928 { +39, 0, 0, 0 },
929 { +59, 0, 0, 0 },
930 { 127, 0, 0, 0 }
931 #else
932 { -11, 0 },
933 { +9, 0 },
934 { +39, 0 },
935 { +59, 0 },
936 { 127, 0 }
937 #endif
938 },
939 },
940 //IQ swap
941 SWAP_IQ_DCS
942 };
943
944 //copy from gsm900
945 const T_RF_BAND rf_850 =
946 {
947 { //RX structure
948 //T_RX_CAL_PARAMS rx_cal_params
949 {
950 181, //g_magic
951 40, //lna_gain_max * 2
952 40, //lna_th_high
953 44 //lna_th_low
954 },
955 { //T_RF_AGC_BAND agc_bands[RF_RX_CAL_CHAN_SIZE];
956 // Remark: ARFCN=0 (GSM-E) is maintained by 1st GSM subbband.
957 // upper_bound, agc_calib
958 { 10, 0}, // sub-band1 up to arfcn = 10, Agc calibration = 0db
959 { 30, 0}, // sub-band2 up to arfcn = 30, Agc calibration = 0db
960 { 51, 0}, // sub-band3 up to arfcn = 51, Agc calibration = 0db
961 { 71, 0}, // etc.
962 { 90, 0}, //
963 { 112, 0}, //
964 { 124, 0}, //
965 { 991, 0}, //
966 { 992, 0}, //
967 {1023, 0}, //
968 },
969 { //RX temperature compensation
970 { -15 , 0 },
971 { -5 , 0 },
972 { 6 , 0 },
973 { 16 , 0 },
974 { 25 , 0 },
975 { 35 , 0 },
976 { 45 , 0 },
977 { 56 , 0 },
978 { 66 , 0 },
979 { 75 , 0 },
980 { 100 , 0 }
981 }
982 },
983 { //TX structure
984 {// gsm850 T_LEVEL_TX
985 { 510, 0, 0 }, // 0
986 { 510, 0, 0 }, // 1
987 { 510, 0, 0 }, // 2
988 { 510, 0, 0 }, // 3
989 { 510, 0, 0 }, // 4
990 { 510, 0, 0 }, // 5
991 { 449, 1, 0 }, // 6
992 { 361, 2, 0 }, // 7
993 { 291, 3, 0 }, // 8
994 { 236, 4, 0 }, // 9
995 { 192, 5, 0 }, // 10
996 { 157, 6, 0 }, // 11
997 { 130, 7, 0 }, // 12
998 { 107, 8, 0 }, // 13
999 { 86, 9, 0 }, // 14
1000 { 71, 10, 0 }, // 15
1001 { 61, 11, 0 }, // 16
1002 { 52, 12, 0 }, // 17
1003 { 47, 13, 0 }, // 18
1004 { 43, 14, 0 }, // 19
1005 { 43, 14, 0 }, // 20
1006 { 43, 14, 0 }, // 21
1007 { 43, 14, 0 }, // 22
1008 { 43, 14, 0 }, // 23
1009 { 43, 14, 0 }, // 24
1010 { 43, 14, 0 }, // 25
1011 { 43, 14, 0 }, // 26
1012 { 43, 14, 0 }, // 27
1013 { 43, 14, 0 }, // 28
1014 { 43, 14, 0 }, // 29
1015 { 43, 14, 0 }, // 30
1016 { 43, 14, 0 }, // 31
1017 },
1018 {// Channel Calibration Talbles
1019 {// arfcn, tx_chan_cal
1020 { 40, 128 }, // Calibration Table 0
1021 { 80, 128 },
1022 { 124, 128 },
1023 { 586, 128 },
1024 { 661, 128 },
1025 { 736, 128 },
1026 { 885, 128 },
1027 { 1023, 128 }
1028 },
1029 {// arfcn, tx_chan_cal
1030 { 554, 128 }, // Calibration Table 1
1031 { 722, 128 },
1032 { 746, 128 },
1033 { 774, 128 },
1034 { 808, 128 },
1035 { 851, 128 },
1036 { 870, 128 },
1037 { 885, 128 }
1038 },
1039 {// arfcn, tx_chan_cal
1040 { 40, 128 }, // Calibration Table 2
1041 { 80, 128 },
1042 { 124, 128 },
1043 { 586, 128 },
1044 { 661, 128 },
1045 { 736, 128 },
1046 { 885, 128 },
1047 { 1023, 128 }
1048 },
1049 {// arfcn, tx_chan_cal
1050 { 40, 128 }, // Calibration Table 3
1051 { 80, 128 },
1052 { 124, 128 },
1053 { 586, 128 },
1054 { 661, 128 },
1055 { 736, 128 },
1056 { 885, 128 },
1057 { 1023, 128 }
1058 }
1059 },
1060 { //Ramp profiles 850
1061 {
1062 {// Ramp-Up #0 profile - Power Level 5
1063 0,0,0,0,0,0,0,0,0,10,31,31,31,15,10,0
1064 },
1065 { //Ramp-Down #0 profile
1066 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1067 },
1068 },
1069 {
1070 {// Ramp-Up #1 profile - Power Level 6
1071 0,0,0,0,0,0,0,0,0,10,31,31,31,15,10,0
1072 },
1073 { //Ramp-Down #1 profile
1074 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1075 },
1076 },
1077 {
1078 {// Ramp-Up #2 profile - Power Level 7
1079 0,0,0,0,0,0,0,0,0,6,19,31,31,31,10,0
1080 },
1081 { //Ramp-Down #2 profile
1082 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1083 },
1084 },
1085 {
1086 {// Ramp-Up #3 profile - Power Level 8
1087 0,0,0,0,0,0,0,0,0,6,19,31,31,31,10,0
1088 },
1089 { //Ramp-Down #3 profile
1090 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1091 },
1092 },
1093 {
1094 {// Ramp-Up #4 profile - Power Level 9
1095 0,0,0,0,0,0,0,0,0,9,16,31,31,31,10,0
1096 },
1097 { //Ramp-Down #4 profile
1098 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1099 },
1100 },
1101 {
1102 {// Ramp-Up #5 profile - Power Level 10
1103 0,0,0,0,0,0,0,0,0,9,16,31,31,31,10,0
1104 },
1105 { //Ramp-Down #5 profile
1106 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1107 },
1108 },
1109 {
1110 {// Ramp-Up #6 profile - Power Level 11
1111 0,0,0,0,0,0,0,0,0,9,16,31,31,31,10,0
1112 },
1113 { //Ramp-Down #6 profile
1114 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1115 },
1116 },
1117 {
1118 {// Ramp-Up #7 profile - Power Level 12
1119 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
1120 },
1121 { //Ramp-Down #7 profile
1122 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1123 },
1124 },
1125 {
1126 {// Ramp-Up #8 profile - Power Level 13
1127 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
1128 },
1129 { //Ramp-Down #8 profile
1130 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1131 },
1132 },
1133 {
1134 {// Ramp-Up #9 profile - Power Level 14
1135 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
1136 },
1137 { //Ramp-Down #9 profile
1138 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1139 },
1140 },
1141 {
1142 {// Ramp-Up #10 profile - Power Level 15
1143 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
1144 },
1145 { //Ramp-Down #10 profile
1146 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1147 },
1148 },
1149 {
1150 {// Ramp-Up #11 profile - Power Level 16
1151 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
1152 },
1153 { //Ramp-Down #11 profile
1154 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1155 },
1156 },
1157 {
1158 {// Ramp-Up #12 profile - Power Level 17
1159 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
1160 },
1161 { //Ramp-Down #12 profile
1162 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1163 },
1164 },
1165 {
1166 {// Ramp-Up #13 profile - Power Level 18
1167 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
1168 },
1169 { //Ramp-Down #13 profile
1170 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1171 },
1172 },
1173 {
1174 {// Ramp-Up #14 profile - Power Level 19
1175 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
1176 },
1177 { //Ramp-Down #14 profile
1178 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1179 },
1180 },
1181 {
1182 {// Ramp-Up #15 profile - Power Level 19
1183 0,0,0,0,0,0,0,0,0,0,25,31,31,31,10,0
1184 },
1185 {// Ramp-Down #15 profile
1186 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1187 }
1188 }
1189 },
1190 { //TX temperature compensation
1191 #if (ORDER2_TX_TEMP_CAL==1)
1192 { -11, 0, 0, 0 },
1193 { +9, 0, 0, 0 },
1194 { +39, 0, 0, 0 },
1195 { +59, 0, 0, 0 },
1196 { 127, 0, 0, 0 }
1197 #else
1198 { -11, 0 },
1199 { +9, 0 },
1200 { +39, 0 },
1201 { +59, 0 },
1202 { 127, 0 }
1203 #endif
1204 },
1205 },
1206 //IQ swap
1207 SWAP_IQ_GSM850,
1208 };
1209
1210 //copy from dcs1800
1211 const T_RF_BAND rf_1900 =
1212 {
1213 { //RX structure
1214 { //T_RX_CAL_PARAMS rx_cal_params
1215 186, //g_magic
1216 40, //lna gain * 2
1217 40, //lna_th_high
1218 44 //lna_th_low
1219 },
1220 { //T_RF_AGC_BAND agc_bands[RF_RX_CAL_CHAN_SIZE];
1221 /*--------------*/
1222 /*-- PCS band --*/
1223 /*--------------*/
1224 { 548, 1}, //
1225 { 622, 1}, //
1226 { 680, 0}, //
1227 { 745, 0}, //
1228 { 812, 3}, //
1229 { 860, 0}, //
1230 { 885, 2}, //
1231 { 991, 0}, //
1232 { 992, 0}, //
1233 {1023, 0}, //
1234 },
1235 { //RX temperature compensation
1236 { -15 , 0 },
1237 { -5 , 0 },
1238 { 6 , 0 },
1239 { 16 , 0 },
1240 { 25 , 0 },
1241 { 35 , 0 },
1242 { 45 , 0 },
1243 { 56 , 0 },
1244 { 66 , 0 },
1245 { 75 , 0 },
1246 { 100 , 0 }
1247 }
1248 },
1249 { //TX structure
1250 {// pcs1900 T_LEVEL_TX
1251 { 460, 0, 0 }, // 0
1252 { 373, 1, 0 }, // 1
1253 { 307, 2, 0 }, // 2
1254 { 253, 3, 0 }, // 3
1255 { 209, 4, 0 }, // 4
1256 { 175, 5, 0 }, // 5
1257 { 145, 6, 0 }, // 6
1258 { 122, 7, 0 }, // 7
1259 { 99, 8, 0 }, // 8
1260 { 83, 9, 0 }, // 9
1261 { 70, 10, 0 }, // 10
1262 { 58, 11, 0 }, // 11
1263 { 47, 12, 0 }, // 12
1264 { 38, 13, 0 }, // 13
1265 { 32, 14, 0 }, // 14
1266 { 25, 15, 0 }, // 15
1267 { 25, 15, 0 }, // 16
1268 { 25, 15, 0 }, // 17
1269 { 25, 15, 0 }, // 18
1270 { 25, 15, 0 }, // 19
1271 { 25, 15, 0 }, // 20
1272 { 25, 15, 0 }, // 21
1273 { 25, 15, 0 }, // 22
1274 { 25, 15, 0 }, // 23
1275 { 25, 15, 0 }, // 24
1276 { 25, 15, 0 }, // 25
1277 { 25, 15, 0 }, // 26
1278 { 25, 15, 0 }, // 27
1279 { 25, 15, 0 }, // 28
1280 { 460, 0, 0 }, // 29
1281 { 460, 0, 0 }, // 30
1282 { 460, 0, 0 }, // 31
1283 },
1284 {// Channel Calibration Tables
1285 {// arfcn, tx_chan_cal
1286 { 549, 127 }, // Calibration Table 0
1287 { 586, 127 },
1288 { 623, 127 },
1289 { 697, 128 },
1290 { 726, 129 },
1291 { 754, 128 },
1292 { 782, 129 },
1293 { 810, 131 }
1294 },
1295 {
1296 { 549, 128 }, // Calibration Table 1
1297 { 586, 128 },
1298 { 623, 128 },
1299 { 697, 128 },
1300 { 726, 128 },
1301 { 754, 128 },
1302 { 782, 128 },
1303 { 810, 128 }
1304 },
1305 {// arfcn, tx_chan_cal
1306 { 549, 128 }, // Calibration Table 2
1307 { 586, 128 },
1308 { 623, 128 },
1309 { 697, 128 },
1310 { 726, 128 },
1311 { 754, 128 },
1312 { 782, 128 },
1313 { 810, 128 }
1314 },
1315 {// arfcn, tx_chan_cal
1316 { 549, 128 }, // Calibration Table 3
1317 { 586, 128 },
1318 { 623, 128 },
1319 { 697, 128 },
1320 { 726, 128 },
1321 { 754, 128 },
1322 { 782, 128 },
1323 { 810, 128 }
1324 }
1325 },
1326 { // PCS1900 Power Ramp Values
1327 {
1328 {// Ramp-Up #0 profile - Power Level 0
1329 0,0,0,0,0,0,0,0,0,9,16,31,31,31,10,0
1330 },
1331 {// Ramp-Down #0 profile
1332 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1333 },
1334 },
1335 {
1336 {// Ramp-Up #1 profile - Power Level 1
1337 0,0,0,0,0,0,0,0,0,10,15,31,31,31,10,0
1338 },
1339 {// Ramp-Down #1 profile
1340 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1341 },
1342 },
1343 {
1344 {// Ramp-Up #2 profile - Power Level 2
1345 0,0,0,0,0,0,0,0,0,10,15,31,31,31,10,0
1346 },
1347 {// Ramp-Down #2 profile
1348 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1349 },
1350 },
1351 {
1352 {// Ramp-Up #3 profile - Power Level 3
1353 0,0,0,0,0,0,0,0,0,17,18,29,24,30,10,0
1354 },
1355 {// Ramp-Down #3 profile
1356 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1357 },
1358 },
1359 {
1360 {// Ramp-Up #4 profile - Power Level 4
1361 0,0,0,0,0,0,0,0,0,17,18,29,24,30,10,0
1362 },
1363 {// Ramp-Down #4 profile
1364 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1365 },
1366 },
1367 {
1368 {// Ramp-Up #5 profile - Power Level 5
1369 0,0,0,0,0,0,0,0,0,17,18,29,24,30,10,0
1370 },
1371 {// Ramp-Down #5 profile
1372 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1373 },
1374 },
1375 {
1376 {// Ramp-Up #6 profile - Power Level 6
1377 0,0,0,0,0,0,0,0,0,17,18,29,24,30,10,0
1378 },
1379 {// Ramp-Down #6 profile
1380 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1381 },
1382 },
1383 {
1384 {// Ramp-Up #7 profile - Power Level 7
1385 0 ,0,0,0,0,0,0,0,0,17,18,29,24,30,10,0
1386 },
1387 {// Ramp-Down #7 profile
1388 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1389 },
1390 },
1391 {
1392 {// Ramp-Up #8 profile - Power Level 8
1393 0,0,0,0,0,0,0,0,0,17,18,29,24,30,10,0
1394 },
1395 {// Ramp-Down #8 profile
1396 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1397 },
1398 },
1399 {
1400 {// Ramp-Up #9 profile - Power Level 9
1401 0,0,0,0,0,0,0,0,0,17,18,29,24,30,10,0
1402 },
1403 {// Ramp-Down #9 profile
1404 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1405 },
1406 },
1407 {
1408 {// Ramp-Up #10 profile - Power Level 10
1409 0,0,0,0,0,0,0,0,0,17,18,29,24,30,10,0
1410 },
1411 {// Ramp-Down #10 profile
1412 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1413 },
1414 },
1415 {
1416 {// Ramp-Up #11 profile - Power Level 11
1417 0,0,0,0,0,0,0,0,0,17,18,29,24,30,10,0
1418 },
1419 {// Ramp-Down #11 profile
1420 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1421 },
1422 },
1423 {
1424 {// Ramp-Up #12 profile - Power Level 12
1425 0,0,0,0,0,0,0,0,0,17,18,29,24,30,10,0
1426 },
1427 {// Ramp-Down #12 profile
1428 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1429 },
1430 },
1431 {
1432 {// Ramp-Up #13 profile - Power Level 13
1433 0,0,0,0,0,0,0,0,0,17,18,29,24,30,10,0
1434 },
1435 {// Ramp-Down #13 profile
1436 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1437 },
1438 },
1439 {
1440 {// Ramp-Up #14 profile - Power Level 14
1441 0,0,0,0,0,0,0,0,0,17,18,29,24,30,10,0
1442 },
1443 {// Ramp-Down #14 profile
1444 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1445 },
1446 },
1447 {
1448 {// Ramp-Up #15 profile - Power Level 15
1449 0,0,0,0,0,0,0,0,0,17,18,29,24,30,10,0
1450 },
1451 {// Ramp-Down #15 profile
1452 0,10,25,31,31,22,9,0,0,0,0,0,0,0,0,0
1453 },
1454 },
1455 },
1456 { //TX temperature compensation
1457 #if (ORDER2_TX_TEMP_CAL==1)
1458 { -11, 0, 0, 0 },
1459 { +9, 0, 0, 0 },
1460 { +39, 0, 0, 0 },
1461 { +59, 0, 0, 0 },
1462 { 127, 0, 0, 0 }
1463 #else
1464 { -11, 0 },
1465 { +9, 0 },
1466 { +39, 0 },
1467 { +59, 0 },
1468 { 127, 0 }
1469 #endif
1470 },
1471 },
1472 //IQ swap
1473 SWAP_IQ_PCS
1474 };
1475
1476 /*------------------------------------------*/
1477 /* ABB Initialization words
1478 /*------------------------------------------*/
1479 #if (ANALOG == 1)
1480 UWORD16 abb[ABB_TABLE_SIZE] =
1481 {
1482 C_AFCCTLADD, // Value at reset
1483 C_VBUR, // Uplink gain amp 0dB, Sidetone gain to mute
1484 C_VBDR, // Downlink gain amp 0dB, Volume control 0 dB
1485 C_BBCTL, // value at reset
1486 C_APCOFF, // value at reset
1487 C_BULIOFF, // value at reset
1488 C_BULQOFF, // value at reset
1489 C_DAI_ON_OFF, // value at reset
1490 C_AUXDAC, // value at reset
1491 C_VBCR, // VULSWITCH=0, VDLAUX=1, VDLEAR=1
1492 C_APCDEL // value at reset
1493 };
1494 #elif (ANALOG == 2)
1495 UWORD16 abb[ABB_TABLE_SIZE] =
1496 {
1497 C_AFCCTLADD,
1498 C_VBUR,
1499 C_VBDR,
1500 C_BBCTL,
1501 C_BULGCAL,
1502 C_APCOFF,
1503 C_BULIOFF,
1504 C_BULQOFF,
1505 C_DAI_ON_OFF,
1506 C_AUXDAC,
1507 C_VBCR,
1508 C_VBCR2,
1509 C_APCDEL,
1510 C_APCDEL2
1511 };
1512
1513 #elif (ANALOG == 3)
1514 UWORD16 abb[ABB_TABLE_SIZE] =
1515 {
1516 C_AFCCTLADD,
1517 C_VBUR,
1518 C_VBDR,
1519 C_BBCTL,
1520 C_BULGCAL,
1521 C_APCOFF,
1522 C_BULIOFF,
1523 C_BULQOFF,
1524 C_DAI_ON_OFF,
1525 C_AUXDAC,
1526 C_VBCR,
1527 C_VBCR2,
1528 C_APCDEL,
1529 C_APCDEL2,
1530 C_VBPOP,
1531 C_VAUDINITD,
1532 C_VAUDCR,
1533 C_VAUOCR,
1534 C_VAUSCR,
1535 C_VAUDPLL
1536 };
1537
1538 #endif
1539 /*------------------------------------------*/
1540 /* Gain table */
1541 /* specified in the TRF6053 spec */
1542 /* 2 dB steps - LNA always ON */
1543 /*------------------------------------------*/
1544 UWORD16 AGC_TABLE[AGC_TABLE_SIZE] =
1545 {
1546 0x00, //6dB
1547 0x01, //8dB
1548 0x02, //10dB
1549 0x03, //12dB
1550 0x04, //14
1551 0x05, //16
1552 0x06, //18
1553 0x07, //20
1554 0x08, //22
1555 0x09, //24
1556 0x0a, //26
1557 0x0b, //28
1558 0x0c, //30
1559 0x0d, //32
1560 0x0e, //34
1561 0x0f, //36
1562 0x10, //38
1563 0x11, //40
1564 0x12, //42
1565 0x13, //44
1566 0x14, //46
1567 0x15, //48
1568 0x16, //50
1569 0x17, //52
1570 0x18, //54
1571 0x19, //56
1572 0x1a //58
1573 };
1574
1575 // structure for ADC conversion (4 Internal channel + 5 Ext channels max.)
1576 T_ADC adc;
1577
1578 // MADC calibration structure
1579 T_ADCCAL adc_cal=
1580 { // a: 0,..,8
1581 // b, 0,..,8
1582 // cal_a = 4*1750 is the Typical value 1.75 V ref voltage , divide by 4
1583 7000, 8750, 7000, 7000, 7000, 7000, 7000, 256, 7000,
1584 0, 0, 0, 0, 0, 0, 0, 0, 0
1585 };
1586
1587
1588 // table which converts ADC value into RF temperature
1589 T_TEMP temperature[TEMP_TABLE_SIZE] =
1590 {
1591 7, -35,
1592 7, -34,
1593 8, -33,
1594 8, -32,
1595 9, -31,
1596 9, -30,
1597 10, -29,
1598 11, -28,
1599 11, -27,
1600 12, -26,
1601 13, -25,
1602 14, -24,
1603 14, -23,
1604 15, -22,
1605 16, -21,
1606 17, -20,
1607 18, -19,
1608 19, -18,
1609 21, -17,
1610 22, -16,
1611 23, -15,
1612 24, -14,
1613 26, -13,
1614 27, -12,
1615 29, -11,
1616 30, -10,
1617 32, -9,
1618 34, -8,
1619 36, -7,
1620 37, -6,
1621 39, -5,
1622 41, -4,
1623 44, -3,
1624 46, -2,
1625 48, -1,
1626 51, 0,
1627 53, 1,
1628 56, 2,
1629 59, 3,
1630 61, 4,
1631 64, 5,
1632 68, 6,
1633 71, 7,
1634 74, 8,
1635 78, 9,
1636 81, 10,
1637 85, 11,
1638 89, 12,
1639 93, 13,
1640 97, 14,
1641 101, 15,
1642 105, 16,
1643 110, 17,
1644 115, 18,
1645 119, 19,
1646 124, 20,
1647 130, 21,
1648 135, 22,
1649 140, 23,
1650 146, 24,
1651 152, 25,
1652 158, 26,
1653 164, 27,
1654 170, 28,
1655 176, 29,
1656 183, 30,
1657 190, 31,
1658 197, 32,
1659 204, 33,
1660 211, 34,
1661 219, 35,
1662 226, 36,
1663 234, 37,
1664 242, 38,
1665 250, 39,
1666 259, 40,
1667 267, 41,
1668 276, 42,
1669 285, 43,
1670 294, 44,
1671 303, 45,
1672 312, 46,
1673 322, 47,
1674 331, 48,
1675 341, 49,
1676 351, 50,
1677 361, 51,
1678 371, 52,
1679 382, 53,
1680 392, 54,
1681 403, 55,
1682 413, 56,
1683 424, 57,
1684 435, 58,
1685 446, 59,
1686 458, 60,
1687 469, 61,
1688 480, 62,
1689 492, 63,
1690 503, 64,
1691 515, 65,
1692 527, 66,
1693 539, 67,
1694 550, 68,
1695 562, 69,
1696 574, 70,
1697 586, 71,
1698 598, 72,
1699 611, 73,
1700 623, 74,
1701 635, 75,
1702 647, 76,
1703 659, 77,
1704 671, 78,
1705 683, 79,
1706 696, 80,
1707 708, 81,
1708 720, 82,
1709 732, 83,
1710 744, 84,
1711 756, 85,
1712 768, 86,
1713 780, 87,
1714 792, 88,
1715 804, 89,
1716 816, 90,
1717 827, 91,
1718 839, 92,
1719 851, 93,
1720 862, 94,
1721 873, 95
1722 };