📄 l1_rf12.c
字号:
{// Ramp-Up #6 profile - Power Level 6
0,0,0,3,8,7,2,7,
1,4,22,5,29,26,12,2
},
{// Ramp-Down #6 profile
4,20,21,31,31,21,0,0,
0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #7 profile - Power Level 7
0,0,0,4,8,2,7,7,
5,7,6,6,31,31,14,0
},
{// Ramp-Down #7 profile
3,13,31,31,31,19,0,0,
0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #8 profile - Power Level 8
0,0,0,6,2,8,3,5,
16,3,9,25,6,31,14,0
},
{// Ramp-Down #8 profile
5,13,29,31,31,19,0,0,
0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #9 profile - Power Level 9
0,0,0,7,2,0,8,12,
17,3,31,9,3,27,8,1
},
{// Ramp-Down #9 profile
1,17,22,31,31,26,0,0,
0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #10 profile - Power Level 10
0,0,0,6,2,3,6,8,
12,31,14,18,15,11,2,0
},
{// Ramp-Down #10 profile
3,8,27,21,31,31,7,0,
0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #11 profile - Power Level 11
0,0,0,3,3,4,2,28,
12,31,31,7,3,3,1,0
},
{// Ramp-Down #11 profile
3,12,26,20,31,31,5,0,
0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #12 profile - Power Level 12
0,0,0,1,4,9,31,30,
26,20,7,0,0,0,0,0
},
{// Ramp-Down #12 profile
2,4,29,31,31,31,0,0,
0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #13 profile - Power Level 13
0,0,0,0,8,30,28,31,
16,11,4,0,0,0,0,0
},
{// Ramp-Down #13 profile
2,4,31,31,31,29,0,0,
0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #14 profile - Power Level 14
0,0,0,6,26,28,30,25,
13,0,0,0,0,0,0,0
},
{// Ramp-Down #14 profile
0,6,18,31,31,31,11,0,
0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #15 profile - Power Level 15
0,0,24,22,21,20,21,14,
6,0,0,0,0,0,0,0
},
{// Ramp-Down #15 profile
0,0,22,31,24,30,21,0,
0,0,0,0,0,0,0,0
},
},
},
#else
{ { 0,0,13,0,0,0,5,0,0,13,24,31,31,11,0,0 }, // Ramp-Up #0 profile - Power Level 0
{ 0,31,31,31,31,4,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,21,0,0,0,0,0,11,30,31,25,10,0,0 }, // Ramp-Up #0 profile - Power Level 1
{ 0,31,31,31,31,4,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,0,6,20,0,0,0,0,31,31,30,10,0,0 }, // Ramp-Up #0 profile - Power Level 2
{ 0,31,27,28,24,18,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,30,0,0,0,0,0,0,16,30,31,21,0,0 }, // Ramp-Up #0 profile - Power Level 3
{ 0,31,31,31,31,4,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,0,31,0,0,0,0,12,31,30,24,0,0,0 }, // Ramp-Up #0 profile - Power Level 4
{ 0,31,31,31,31,4,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,31,0,0,0,0,0,0,31,31,31,4,0,0 }, // Ramp-Up #0 profile - Power Level 5
{ 0,31,31,31,31,4,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,6,31,0,0,0,0,0,25,31,31,4,0,0 }, // Ramp-Up #0 profile - Power Level 6
{ 0,31,31,31,31,4,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,0,19,31,0,0,0,0,12,31,31,4,0,0 }, // Ramp-Up #0 profile - Power Level 7
{ 0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,20,31,0,0,0,0,0,11,31,31,4,0,0 }, // Ramp-Up #0 profile - Power Level 8
{ 0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,21,31,0,0,0,0,0,14,31,31,0,0,0 }, // Ramp-Up #0 profile - Power Level 9
{ 0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,0,27,31,0,0,0,16,18,0,31,5,0,0 }, // Ramp-Up #0 profile - Power Level 10
{ 0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,31,0,0,0,31,31,0,31,4,0,0,0,0 }, // Ramp-Up #0 profile - Power Level 11
{ 0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,0,0,16,27,31,31,23,0,0,0,0,0,0 }, // Ramp-Up #0 profile - Power Level 12
{ 0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,0,16,31,25,31,25,0,0,0,0,0,0,0 }, // Ramp-Up #0 profile - Power Level 13
{ 0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,0,31,31,31,31,4,0,0,0,0,0,0,0 }, // Ramp-Up #0 profile - Power Level 14
{ 0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,0,31,31,31,31,4,0,0,0,0,0,0,0 }, // Ramp-Up #0 profile - Power Level 15
{ 0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0 }, }, }, // Ramp-Down #0 profile
#endif
{ //TX temperature compensation
#if (ORDER2_TX_TEMP_CAL==1)
{ -11, 0, 0, 0 },
{ +9, 0, 0, 0 },
{ +39, 0, 0, 0 },
{ +59, 0, 0, 0 },
{ 127, 0, 0, 0 }
#else
{ -11, 0 },
{ +9, 0 },
{ +39, 0 },
{ +59, 0 },
{ 127, 0 }
#endif
},
},
//IQ swap
SWAP_IQ_PCS
};
/*------------------------------------------*/
/* ABB Initialization words
/*------------------------------------------*/
#if (ANALOG == 1)
UWORD16 abb[ABB_TABLE_SIZE] =
{
C_AFCCTLADD, // Value at reset
C_VBUR, // Uplink gain amp 0dB, Sidetone gain to mute
C_VBDR, // Downlink gain amp 0dB, Volume control 0 dB
C_BBCTL, // value at reset
C_APCOFF, // value at reset
C_BULIOFF, // value at reset
C_BULQOFF, // value at reset
C_DAI_ON_OFF, // value at reset
C_AUXDAC, // value at reset
C_VBCR, // VULSWITCH=0, VDLAUX=1, VDLEAR=1
C_APCDEL // value at reset
};
#elif (ANALOG == 2)
UWORD16 abb[ABB_TABLE_SIZE] =
{
C_AFCCTLADD,
C_VBUR,
C_VBDR,
C_BBCTL,
C_BULGCAL,
C_APCOFF,
C_BULIOFF,
C_BULQOFF,
C_DAI_ON_OFF,
C_AUXDAC,
C_VBCR,
C_VBCR2,
C_APCDEL,
C_APCDEL2
};
#elif (ANALOG == 3)
UWORD16 abb[ABB_TABLE_SIZE] =
{
C_AFCCTLADD,
C_VBUR,
C_VBDR,
C_BBCTL,
C_BULGCAL,
C_APCOFF,
C_BULIOFF,
C_BULQOFF,
C_DAI_ON_OFF,
C_AUXDAC,
C_VBCR,
C_VBCR2,
C_APCDEL,
C_APCDEL2,
C_VBPOP,
C_VAUDINITD,
C_VAUDCR,
C_VAUOCR,
C_VAUSCR,
C_VAUDPLL
};
#endif
/*------------------------------------------*/
/* Gain table */
/* specified in the TRF6053 spec */
/* 2 dB steps - LNA always ON */
/*------------------------------------------*/
UWORD16 AGC_TABLE[AGC_TABLE_SIZE] =
{
0x00, //reserved
0x01, //reserved
0x02, //reserved
0x03, //reserved
0x04, //reserved
0x05, //reserved
0x06, //14 dB
0x07, //16
0x08, //18
0x09, //20
0x0a, //22
0x0b, //24
0x0c, //26
0x0d, //28
0x0e, //30
0x0f, //32
0x10, //34
0x11, //36
0x12, //38
0x13, //40
/*
0x14, //reserved
0x15, //reserved
0x16, //reserved
0x17, //reserved
0x18, //reserved
0x19, //reserved
0x1a, //reserved
0x1b, //reserved
0x1c, //reserved
0x1d, //reserved
0x1e, //reserved
0x1f, //reserved
*/
};
// structure for ADC conversion (4 Internal channel + 5 Ext channels max.)
T_ADC adc;
// MADC calibration structure
T_ADCCAL adc_cal=
{ // a: 0,..,8
// b, 0,..,8
// cal_a = 4*1750 is the Typical value 1.75 V ref voltage , divide by 4
7000, 8750, 7000, 7000, 7000, 7000, 7000, 256, 7000,
0, 0, 0, 0, 0, 0, 0, 0, 0
};
#if (BOARD == 41)
// table which converts ADC value into RF temperature
T_TEMP temperature[TEMP_TABLE_SIZE] =
{
// Temperature compensation for EVARITA - S.Glock, J.Demay 04/23/2003
582, -40,
640, -10,
698, 25,
756, 60,
815, 90
};
#else
// table which converts ADC value into RF temperature
T_TEMP temperature[TEMP_TABLE_SIZE] =
{
7, -35,
7, -34,
8, -33,
8, -32,
9, -31,
9, -30,
10, -29,
11, -28,
11, -27,
12, -26,
13, -25,
14, -24,
14, -23,
15, -22,
16, -21,
17, -20,
18, -19,
19, -18,
21, -17,
22, -16,
23, -15,
24, -14,
26, -13,
27, -12,
29, -11,
30, -10,
32, -9,
34, -8,
36, -7,
37, -6,
39, -5,
41, -4,
44, -3,
46, -2,
48, -1,
51, 0,
53, 1,
56, 2,
59, 3,
61, 4,
64, 5,
68, 6,
71, 7,
74, 8,
78, 9,
81, 10,
85, 11,
89, 12,
93, 13,
97, 14,
101, 15,
105, 16,
110, 17,
115, 18,
119, 19,
124, 20,
130, 21,
135, 22,
140, 23,
146, 24,
152, 25,
158, 26,
164, 27,
170, 28,
176, 29,
183, 30,
190, 31,
197, 32,
204, 33,
211, 34,
219, 35,
226, 36,
234, 37,
242, 38,
250, 39,
259, 40,
267, 41,
276, 42,
285, 43,
294, 44,
303, 45,
312, 46,
322, 47,
331, 48,
341, 49,
351, 50,
361, 51,
371, 52,
382, 53,
392, 54,
403, 55,
413, 56,
424, 57,
435, 58,
446, 59,
458, 60,
469, 61,
480, 62,
492, 63,
503, 64,
515, 65,
527, 66,
539, 67,
550, 68,
562, 69,
574, 70,
586, 71,
598, 72,
611, 73,
623, 74,
635, 75,
647, 76,
659, 77,
671, 78,
683, 79,
696, 80,
708, 81,
720, 82,
732, 83,
744, 84,
756, 85,
768, 86,
780, 87,
792, 88,
804, 89,
816, 90,
827, 91,
839, 92,
851, 93,
862, 94,
873, 95
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -