l1_rf12.c
来自「是一个手机功能的模拟程序」· C语言 代码 · 共 2,110 行 · 第 1/5 页
C
2,110 行
{ 500, 2, 0 }, // 2
{ 411, 3, 0 }, // 3
{ 339, 4, 0 }, // 4
{ 280, 5, 0 }, // 5
{ 231, 6, 0 }, // 6
{ 194, 7, 0 }, // 7
{ 165, 8, 0 }, // 8
{ 143, 9, 0 }, // 9
{ 122, 10, 0 }, // 10
{ 109, 11, 0 }, // 11
{ 96, 12, 0 }, // 12
{ 85, 13, 0 }, // 13
{ 80, 14, 0 }, // 14
{ 75, 15, 0 }, // 15 Lowest power
{ 75, 15, 0 }, // 16
{ 75, 15, 0 }, // 17
{ 75, 15, 0 }, // 18
{ 75, 15, 0 }, // 19
{ 75, 15, 0 }, // 20
{ 75, 15, 0 }, // 21
{ 75, 15, 0 }, // 22
{ 75, 15, 0 }, // 23
{ 75, 15, 0 }, // 24
{ 75, 15, 0 }, // 25
{ 75, 15, 0 }, // 26
{ 75, 15, 0 }, // 27
{ 75, 15, 0 }, // 28
{ 754, 0, 0 }, // 29
{ 754, 0, 0 }, // 30
{ 754, 0, 0 }, // 31
#endif
},
{// Channel Calibration Tables
{// arfcn, tx_chan_cal
{ 554, 126 }, // Calibration Table 0
{ 722, 128 },
{ 746, 128 },
{ 774, 128 },
{ 808, 128 },
{ 851, 134 },
{ 870, 134 },
{ 885, 136 }
},
{
{ 554, 128 }, // Calibration Table 1
{ 722, 128 },
{ 746, 128 },
{ 774, 128 },
{ 808, 128 },
{ 851, 128 },
{ 870, 128 },
{ 885, 128 }
},
{// arfcn, tx_chan_cal
{ 554, 128 }, // Calibration Table 2
{ 722, 128 },
{ 746, 128 },
{ 774, 128 },
{ 808, 128 },
{ 851, 128 },
{ 870, 128 },
{ 885, 128 }
},
{// arfcn, tx_chan_cal
{ 554, 128 }, // Calibration Table 3
{ 722, 128 },
{ 746, 128 },
{ 774, 128 },
{ 808, 128 },
{ 851, 128 },
{ 870, 128 },
{ 885, 128 }
}
},
{ // DCS Power Ramp Values
#if (PA == 3) // Hitachi
{
{// Ramp-Up #0 profile - Power Level 0
0,0,0,10,16,0,0,0,6,0,0,0,19,31,31,15
},
{// Ramp-Down #0 profile
6,13,28,26,22,19,6,2,6,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #1 profile - Power Level 1
0,0,0,0,12,2,0,12,0,0,0,11,24,24,31,12
},
{// Ramp-Down #1 profile
6,16,23,28,22,19,6,2,6,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #2 profile - Power Level 2
0,0,0,6,0,8,0,15,0,2,0,10,22,27,16,22
},
{// Ramp-Down #2 profile
4,7,26,29,31,23,2,0,6,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #3 profile - Power Level 3
0,0,0,18,0,0,0,16,0,0,0,10,29,31,22,2
},
{// Ramp-Down #3 profile
8,12,19,20,23,20,14,6,4,2,0,0,0,0,0,0
},
},
{
{// Ramp-Up #4 profile - Power Level 4
0,0,0,16,0,3,2,1,23,0,0,8,23,31,19,2
},
{// Ramp-Down #4 profile
0,3,19,24,31,12,20,15,4,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #5 profile - Power Level 5
0,0,0,21,0,0,0,1,31,0,0,0,17,30,20,8
},
{// Ramp-Down #5 profile
3,14,26,31,20,17,6,11,0,0,0,0,0,0,0,0,
},
},
{
{// Ramp-Up #6 profile - Power Level 6
0,0,0,15,0,0,11,2,24,6,9,0,19,31,10,1
},
{// Ramp-Down #6 profile
5,20,31,23,6,17,26,0,0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #7 profile - Power Level 7
0,0,0,15,0,0,11,2,18,0,22,0,7,0,31,22
},
{// Ramp-Down #7 profile
0,5,20,31,23,6,17,26,0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #8 profile - Power Level 8
1,0,0,14,0,11,0,29,0,0,9,14,13,6,27,4
},
{// Ramp-Down #8 profile
2,19,27,25,31,16,8,0,0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #9 profile - Power Level 9
0,0,0,22,0,0,20,20,7,11,0,15,5,0,28,0
},
{// Ramp-Down #9 profile
0,2,23,31,31,31,0,0,10,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #10 profile - Power Level 10
0,0,0,22,0,0,20,20,7,11,0,15,5,0,28,0
},
{// Ramp-Down #10 profile
0,0,25,31,31,31,0,0,10,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #11 profile - Power Level 11
0,0,22,0,0,20,20,7,11,0,15,5,0,28,0,0
},
{// Ramp-Down #11 profile
0,0,20,31,31,31,5,0,10,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #12 profile - Power Level 12
0,0,0,4,31,31,4,11,0,11,2,17,6,11,0,0
},
{// Ramp-Down #12 profile
0,0,27,30,31,31,9,0,0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #13 profile - Power Level 13
0,4,31,31,4,11,0,11,2,17,6,11,0,0,0,0
},
{// Ramp-Down #13 profile
0,0,0,27,30,31,31,9,0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #14 profile - Power Level 14
0,0,0,0,31,31,31,19,16,0,0,0,0,0,0,0
},
{// Ramp-Down #14 profile
0,0,2,31,31,31,31,2,0,0,0,0,0,0,0,0
},
},
{
{// Ramp-Up #15 profile - Power Level 15
0,0,0,0,31,31,31,19,16,0,0,0,0,0,0,0
},
{// Ramp-Down #15 profile
0,0,2,31,31,31,31,2,0,0,0,0,0,0,0,0
},
},
},
#else
{ { 0,0,0,19,0,0,0,0,0,8,31,31,31,8,0,0 }, // Ramp-Up #0 profile - Power Level 0
{ 12,19,23,24,28,15,0,0,7,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,19,0,0,0,4,0,0,8,31,31,31,4,0,0 }, // Ramp-Up #0 profile - Power Level 1
{ 0,11,27,30,29,31,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,26,0,0,0,0,0,22,23,26,21,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,0,27,0,0,0,0,0,19,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,30,0,0,0,0,0,13,31,30,24,0,0,0 }, // Ramp-Up #0 profile - Power Level 4
{ 0,18,30,31,31,18,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,6,31,0,0,0,0,6,31,30,24,0,0,0 }, // Ramp-Up #0 profile - Power Level 5
{ 0,13,30,31,31,23,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 31,0,0,0,7,0,0,11,0,0,26,30,23,0,0,0 }, // Ramp-Up #0 profile - Power Level 6
{ 0,13,30,31,31,23,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,31,0,0,0,0,22,0,0,0,21,30,24,0,0,0 }, // Ramp-Up #0 profile - Power Level 7
{ 0,13,30,31,31,23,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,0,0,9,31,31,0,0,0,26,31,0,0,0 }, // Ramp-Up #0 profile - Power Level 8
{ 0,14,31,31,31,21,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,0,8,31,31,0,0,0,0,27,31,0,0,0 }, // Ramp-Up #0 profile - Power Level 9
{ 0,31,31,31,31,4,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,5,31,0,0,0,28,14,0,0,0,28,22,0,0,0 }, // Ramp-Up #0 profile - Power Level 10
{ 0,15,31,31,29,22,0,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,0,0,0,16,27,31,31,23,0,0,0,0,0 }, // Ramp-Up #0 profile - Power Level 11
{ 0,0,15,31,31,27,24,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,14,31,31,27,25,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,17,30,31,25,25,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,0,0,31,31,31,31,4,0,0,0,0,0,0 }, // Ramp-Up #0 profile - Power Level 14
{ 0,0,18,31,22,30,27,0,0,0,0,0,0,0,0,0 }, }, // Ramp-Down #0 profile
{ { 0,0,0,31,31,31,31,4,0,0,0,0,0,0,0,0 }, // Ramp-Up #0 profile - Power Level 15
{ 0,0,23,31,31,31,12,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_DCS
};
//copy from gsm900
const T_RF_BAND rf_850 =
{
{ //RX structure
//T_RX_CAL_PARAMS rx_cal_params
{
#if ((BOARD == 40) || (BOARD == 41) || (BOARD == 45)) // EvaRita + D-sample or EvaConso
193, //g_magic
#else
181, //g_magic
#endif
40, //lna_gain_max * 2
40, //lna_th_high
44 //lna_th_low
},
{ //T_RF_AGC_BAND agc_bands[RF_RX_CAL_CHAN_SIZE];
// Remark: ARFCN=0 (GSM-E) is maintained by 1st GSM subbband.
// upper_bound, agc_calib
{ 10, 0}, // sub-band1 up to arfcn = 10, Agc calibration = 0db
{ 30, 0}, // sub-band2 up to arfcn = 30, Agc calibration = 0db
{ 51, 0}, // sub-band3 up to arfcn = 51, Agc calibration = 0db
{ 71, 0}, // etc.
{ 90, 0}, //
{ 112, 0}, //
{ 124, 0}, //
{ 991, 0}, //
{ 992, 0}, //
{1023, 0}, //
},
{ //RX temperature compensation
{ -15 , 0 },
{ -5 , 0 },
{ 6 , 0 },
{ 16 , 0 },
{ 25 , 0 },
{ 35 , 0 },
{ 45 , 0 },
{ 56 , 0 },
{ 66 , 0 },
{ 75 , 0 },
{ 100 , 0 }
}
},
{ //TX structure
{// gsm850 T_LEVEL_TX
#if (PA == 3) // Hitachi
{560, 0, 0}, // 0
{560, 0, 0}, // 1
{560, 0, 0}, // 2
{560, 0, 0}, // 3
{560, 0, 0}, // 4
{560, 0, 0}, // 5 Highest power
{437, 1, 0}, // 6
{355, 2, 0}, // 7
{291, 3, 0}, // 8
{237, 4, 0}, // 9
{194, 5, 0}, // 10
{160, 6, 0}, // 11
{132, 7, 0}, // 12
{110, 8, 0}, // 13
{92, 9, 0}, // 14
{77, 10, 0}, // 15
{67, 11, 0}, // 16
{59, 12, 0}, // 17
{52, 13, 0}, // 18
{46, 14, 0}, // 19 Lowest power
{46, 14, 0}, // 20
{46, 14, 0}, // 21
{46, 14, 0}, // 22
{46, 14, 0}, // 23
{46, 14, 0}, // 24
{46, 14, 0}, // 25
{46, 14, 0}, // 26
{46, 14, 0}, // 27
{46, 14, 0}, // 28
{46, 14, 0}, // 29
{46, 14, 0}, // 30
{46, 14, 0}, // 31
#else
{ 616, 0, 0 }, // 0
{ 616, 0, 0 }, // 1
{ 616, 0, 0 }, // 2
{ 616, 0, 0 }, // 3
{ 616, 0, 0 }, // 4
{ 616, 0, 0 }, // 5 Highest pwr
{ 453, 1, 0 }, // 6
{ 371, 2, 0 }, // 7
{ 309, 3, 0 }, // 8
{ 256, 3, 0 }, // 9
{ 216, 5, 0 }, // 10
{ 182, 6, 0 }, // 11
{ 155, 7, 0 }, // 12
{ 134, 8, 0 }, // 13
{ 116, 9, 0 }, // 14
{ 103, 10, 0 }, // 15
{ 89, 11, 0 }, // 16
{ 87, 12, 0 }, // 17
{ 80, 13, 0 }, // 18
{ 75, 14, 0 }, // 19 lowest pwr
{ 75, 14, 0 }, // 20
{ 75, 14, 0 }, // 21
{ 75, 14, 0 }, // 22
{ 75, 14, 0 }, // 23
{ 75, 14, 0 }, // 24
{ 75, 14, 0 }, // 25
{ 75, 14, 0 }, // 26
{ 75, 14, 0 }, // 27
{ 75, 14, 0 }, // 28
{ 75, 14, 0 }, // 29
{ 75, 14, 0 }, // 30
{ 75, 14, 0 } // 31
#endif
},
{// Channel Calibration Tables
{// arfcn, tx_chan_cal
{ 40, 128 }, // Calibration Table 0
{ 80, 128 },
{ 124, 128 },
{ 586, 128 },
{ 661, 128 },
{ 736, 128 },
{ 885, 128 },
{ 1023, 128 }
},
{// arfcn, tx_chan_cal
{ 554, 130 }, // Calibration Table 1
{ 722, 128 },
{ 746, 129 },
{ 774, 131 },
{ 808, 132 },
{ 851, 134 },
{ 870, 138 },
{ 885, 140 }
},
{// arfcn, tx_chan_cal
{ 40, 128 }, // Calibration Table 2
{ 80, 128 },
{ 124, 128 },
{ 586, 128 },
{ 661, 128 },
{ 736, 128 },
{ 885, 128 },
{ 1023, 128 }
},
{// arfcn, tx_chan_cal
{ 40, 128 }, // Calibration Table 3
{ 80, 128 },
{ 124, 128 },
{ 586, 128 },
{ 661, 128 },
{ 736, 128 },
{ 885, 128 },
{ 1023, 128 }
}
},
{ // gsm850 Power Ramp Values
#if (PA == 3) // Hitachi
{
{// Ramp-Up #0 profile - Power Level 5
8,0,0,0,0,0,6,0,
0,6,18,29,23,21,17,0
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?