MTK RF参数写入代码操作步骤 (2012-09-25 11:43:10)

标签: 

杂谈

分类: 电子信息

 

一、     使用MTK提供的META工具的Update Parameters项读出,存为.ini文件。

二、     .ini文件有以下几个部分:

1、【AFC Control】

在m12193.h文件里

#define  PSI_EE               (6519)           

#define  C_PSI_STA  (505) 

2、【Crystal AFC control】

在l1d_custom_rf.h文件里

#define Custom_RF_XO_CapID  12

3、【GSM900 Sub band,RX loss】

在m12193.c文件里

sAGCGAINOFFSET  AGC_PATHLOSS_GSM900[ PLTABLE_SIZE ] =

  {  15,  GAINLOSS( 2.500 ) },

    {  30,  GAINLOSS( 5.875 ) },

    {  40,  GAINLOSS( 7.625 ) },

    {  50,  GAINLOSS( 8.875 ) },

    {  60,  GAINLOSS( 9.500 ) },

    {  70,  GAINLOSS( 9.750 ) },

    {  80,  GAINLOSS( 9.500 ) },

    {  95,  GAINLOSS( 8.250 ) },

    {  110,  GAINLOSS( 5.375 ) },

    {  124,  GAINLOSS( 2.250 ) },

    {  1000,  GAINLOSS( 8.625 ) },

    {  1023,  GAINLOSS( 3.3750 ) },

   

    { TABLE_END }

};

4、【DCS1800 Sub band,RX loss】

在m12193.c文件里:

sAGCGAINOFFSET  AGC_PATHLOSS_DCS1800[ PLTABLE_SIZE ] =

  { 515, GAINLOSS( 0.250 ) },

    { 530, GAINLOSS( 0.500 ) },

    { 550, GAINLOSS( 0.875 ) },

    { 580, GAINLOSS( 1.375 ) },

    { 650, GAINLOSS( 1.375 ) },

    { 680, GAINLOSS( 1.125 ) },

    { 710, GAINLOSS( 0.875 ) },

    { 760, GAINLOSS( 0.625 ) },

    { 830, GAINLOSS( 1.125 ) },

    { 885, GAINLOSS( 1.0 ) },

   

    { TABLE_END }

};

5、【PCS1900 Sub band,RX loss】

在m12193.c文件里:

sAGCGAINOFFSET  AGC_PATHLOSS_PCS1900[ PLTABLE_SIZE ] =

 

    { 512, GAINLOSS( 0.0 ) },

    { 550, GAINLOSS( 0.0 ) },

    { 650, GAINLOSS( 0.0 ) },

    { 750, GAINLOSS( 0.0 ) },

    { 800, GAINLOSS( 0.0 ) },

    { 810, GAINLOSS( 0.0 ) },

   

    { TABLE_END }

};

6、【GSM850 Sub band,RX loss】

在m12193.c文件里:

sAGCGAINOFFSET  AGC_PATHLOSS_GSM850[ PLTABLE_SIZE ] =

 

    { 128, GAINLOSS( 0.0 ) },

    { 140, GAINLOSS( 0.0 ) },

    { 150, GAINLOSS( 0.0 ) },

    { 170, GAINLOSS( 0.0 ) },

    { 190, GAINLOSS( 0.0 ) },

    { 210, GAINLOSS( 0.0 ) },

    { 220, GAINLOSS( 0.0 ) },

    { 230, GAINLOSS( 0.0 ) },

    { 251, GAINLOSS( 0.0 ) },

   

    { TABLE_END }

};

7、【BB TX Parameters】

在l1d_rf.h文件里:

#define  BBTX_CALRCSEL                0

#define  BBTX_CALRCSEL_H              0

#define  BBTX_COMMON_MODE_VOLTAGE     1//COMMON MODE VOLTAGE: 1.5v

#define  BBTX_COMMON_MODE_VOLTAGE_H   1//COMMON MODE VOLTAGE: 1.5v

#define  BBTX_TRIM_I                  -1// wait calibration

#define  BBTX_TRIM_I_H                0// wait calibration

#define  BBTX_TRIM_Q                  0// wait calibration

#define  BBTX_TRIM_Q_H                0// wait calibration

#define  BBTX_OFFSET_I                -3// wait calibration

#define  BBTX_OFFSET_I_H              0// wait calibration

#define  BBTX_OFFSET_Q                7// wait calibration

#define  BBTX_OFFSET_Q_H              0// wait calibration

#define  BBTX_PHSEL                   0// wait calibration

#define  BBTX_PHSEL_H                 0// wait calibration

#define  BBTX_COARSGAIN               0 //XXXXX no use?

8、【GSM900 level,ramp】

在m12193.c文件里:

sRAMPDATA  GSM_RampData ={};

9、【DCS1800 level,ramp】

在m12193.c文件里:

sRAMPDATA  DCS_RampData ={}

10、【PCS1900 level,ramp】

在m12193.c文件里:

sRAMPDATA  PCS_RampData ={}

11、【GSM850 level,ramp】

在m12193.c文件里:

sRAMPDATA  GSM850_RampData ={}

12、【BT Info】

13、【ADC control】

在chr_parameter.c文件里:

bmt_customized_struct  bmt_custom_chr_def ={}

三、     ini文件内容:

[AFC control]

Initial value=6519

Slope=8.1109

[Crystal AFC control]

cap_id=12

[GSM900 Sub band, RX loss]

Max ARFCN=15,30,40,50,60,70,80,95,110,124,1000,1023

RX loss=2.500,5.875,7.625,8.875,9.500,9.750,9.500,8.250,5.375,2.250,8.625,3.3750

[DCS1800 Sub band, RX loss]

Max ARFCN=515,530,550,580,650,680,710,760,830,885,-1,0

RX loss=0.250,0.500,0.875,1.375,1.375,1.125,0.875,0.625,1.125,1.000,0.000,0.0000

[PCS1900 Sub band, RX loss]

Max ARFCN=512,550,650,750,800,810,-1,0,0,0,0,0

RX loss=0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.0000

[GSM850 Sub band, RX loss]

Max ARFCN=128,140,150,170,190,210,220,230,251,-1,0,0

RX loss=0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.0000

[BB TX Parameters]

BB TX common mode voltage=1

BB TX gain=0

BB TX calrcsel=0

APC bat low voltage=3.50000

APC bat high voltage=4.00000

APC bat low temperature=0.00000

APC bat high temperature=50.00000

Trim I=-1

Trim Q=0

Offset I=-3

Offset Q=7

Calibrated flag=0

BB TX phasesel=0

[GSM900 level, ramp]

APC dc offset=120

Low APC dc offset=0

APC lowest power=5

TX power level=142,163,185,212,242,276,314,359,408,464,528,602,685,752,859,859

profile 0 ramp up=0,0,0,4,6,13,28,61,98,141,177,226,255,255,255,255

profile 0 ramp down=255,255,255,254,154,53,33,19,0,0,0,0,0,0,0,0

profile 1 ramp up=0,0,0,3,6,14,22,36,57,95,134,186,220,255,255,255

profile 1 ramp down=255,255,255,188,78,0,0,0,0,0,0,0,0,0,0,0

profile 2 ramp up=0,0,0,0,4,7,11,20,35,62,119,177,222,255,255,255

profile 2 ramp down=255,255,255,156,66,0,0,0,0,0,0,0,0,0,0,0

profile 3 ramp up=0,0,0,3,8,13,18,40,64,102,145,195,232,255,255,255

profile 3 ramp down=255,255,255,191,86,0,0,0,0,0,0,0,0,0,0,0

profile 4 ramp up=0,0,0,4,8,13,24,37,66,105,142,187,228,255,255,255

profile 4 ramp down=255,255,255,142,0,0,0,0,0,0,0,0,0,0,0,0

profile 5 ramp up=0,0,0,0,6,11,17,30,62,96,140,183,223,255,255,255

profile 5 ramp down=255,255,255,179,120,39,0,0,0,0,0,0,0,0,0,0

profile 6 ramp up=0,0,0,0,0,8,15,35,54,91,128,177,225,255,255,255

profile 6 ramp down=255,255,248,224,125,86,23,5,0,0,0,0,0,0,0,0

profile 7 ramp up=0,0,0,0,0,0,0,0,8,25,65,145,219,255,255,255

profile 7 ramp down=255,255,239,197,138,78,32,10,0,0,0,0,0,0,0,0

profile 8 ramp up=0,0,0,0,0,0,0,0,8,25,65,145,219,255,255,255

profile 8 ramp down=255,255,239,197,138,78,32,10,0,0,0,0,0,0,0,0

profile 9 ramp up=0,0,0,0,0,0,5,11,22,47,98,150,213,255,255,255

profile 9 ramp down=255,255,239,197,138,78,32,10,0,0,0,0,0,0,0,0

profile 10 ramp up=0,0,0,0,0,4,12,25,54,97,137,181,222,255,255,255

profile 10 ramp down=255,255,239,197,138,78,32,10,0,0,0,0,0,0,0,0

profile 11 ramp up=0,0,0,0,0,6,15,31,55,96,136,177,218,255,255,255

profile 11 ramp down=255,255,239,197,138,78,32,10,0,0,0,0,0,0,0,0

profile 12 ramp up=0,0,0,0,0,4,13,31,55,92,133,182,226,255,255,255

profile 12 ramp down=255,255,239,197,138,78,32,10,0,0,0,0,0,0,0,0

profile 13 ramp up=0,0,0,0,0,7,19,43,71,106,148,186,222,255,255,255

profile 13 ramp down=255,255,239,197,138,78,32,10,0,0,0,0,0,0,0,0

profile 14 ramp up=0,0,0,0,0,4,10,23,53,93,136,175,221,240,255,255

profile 14 ramp down=255,255,239,197,138,78,32,10,0,0,0,0,0,0,0,0

profile 15 ramp up=0,0,0,0,0,0,0,0,0,8,25,65,145,219,255,255

profile 15 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

Subband max arfcn=0,20,40,65,80,100,124,975,1000,1010,1023

Subband mid level=12,12,12,12,12,12,12,12,12,12,12

Subband high weight=1.030,1.020,1.010,1.000,0.995,0.990,0.980,1.050,1.040,1.035,1.0300

Subband low weight=1.035,1.025,1.015,1.000,0.995,0.990,0.980,1.058,1.045,1.040,1.0350

Battery compensate, low voltage, low temperature=1.00000

Battery compensate, low voltage, mid temperature=1.00000

Battery compensate, low voltage, high temperature=1.00000

Battery compensate, mid voltage, low temperature=1.00000

Battery compensate, mid voltage, mid temperature=1.00000

Battery compensate, mid voltage, high temperature=1.00000

Battery compensate, high voltage, low temperature=1.00000

Battery compensate, high voltage, mid temperature=1.00000

Battery compensate, high voltage, high temperature=1.00000

TX AFC DAC offset=0

[DCS1800 level, ramp]

APC dc offset=80

Low APC dc offset=0

APC lowest power=0

TX power level=117,123,135,147,162,182,206,234,268,308,358,415,483,559,651,802

profile 0 ramp up=0,0,0,0,0,4,9,18,52,91,168,231,255,255,255,255

profile 0 ramp down=255,255,255,255,213,123,44,10,0,0,0,0,0,0,0,0

profile 1 ramp up=0,0,0,0,0,0,0,0,0,13,40,145,219,255,255,255

profile 1 ramp down=255,255,228,125,60,10,0,0,0,0,0,0,0,0,0,0

profile 2 ramp up=0,0,0,0,0,0,0,0,0,13,40,145,219,255,255,255

profile 2 ramp down=255,255,255,195,95,10,0,0,0,0,0,0,0,0,0,0

profile 3 ramp up=0,0,0,0,0,0,0,0,0,13,40,145,219,255,255,255

profile 3 ramp down=255,255,255,125,35,10,0,0,0,0,0,0,0,0,0,0

profile 4 ramp up=0,0,0,0,0,0,0,0,0,13,40,145,219,255,255,255

profile 4 ramp down=255,255,255,152,88,38,0,0,0,0,0,0,0,0,0,0

profile 5 ramp up=0,0,0,0,0,0,0,0,0,13,40,145,219,255,255,255

profile 5 ramp down=255,255,255,215,141,81,34,13,0,0,0,0,0,0,0,0

profile 6 ramp up=0,0,0,0,0,0,0,0,8,30,65,145,219,255,255,255

profile 6 ramp down=255,255,255,220,170,80,15,10,0,0,0,0,0,0,0,0

profile 7 ramp up=0,0,0,0,0,0,0,0,8,30,65,145,219,255,255,255

profile 7 ramp down=255,255,255,220,170,80,15,10,0,0,0,0,0,0,0,0

profile 8 ramp up=0,0,0,0,0,0,0,0,8,50,99,159,204,255,255,255

profile 8 ramp down=255,255,255,198,157,99,22,10,0,0,0,0,0,0,0,0

profile 9 ramp up=0,0,0,0,0,0,0,0,8,50,99,159,213,255,255,255

profile 9 ramp down=255,255,255,198,160,99,22,10,0,0,0,0,0,0,0,0

profile 10 ramp up=0,0,0,0,0,0,0,8,40,81,132,173,235,255,255,255

profile 10 ramp down=255,255,255,234,177,124,90,22,10,0,0,0,0,0,0,0

profile 11 ramp up=0,0,0,0,0,0,0,0,8,50,99,159,209,255,255,255

profile 11 ramp down=255,255,255,198,148,99,22,10,0,0,0,0,0,0,0,0

profile 12 ramp up=0,0,0,0,0,0,0,0,8,50,99,159,211,255,255,255

profile 12 ramp down=255,255,255,198,167,99,22,10,0,0,0,0,0,0,0,0

profile 13 ramp up=0,0,0,0,0,0,0,8,50,99,159,219,255,255,255,255

profile 13 ramp down=255,255,255,255,198,133,99,22,10,0,0,0,0,0,0,0

profile 14 ramp up=0,0,0,0,0,0,0,8,50,99,159,221,255,255,255,255

profile 14 ramp down=255,255,255,255,198,151,99,22,10,0,0,0,0,0,0,0

profile 15 ramp up=0,0,0,0,0,0,0,8,50,99,159,214,255,255,255,255

profile 15 ramp down=255,255,255,255,198,156,99,22,10,0,0,0,0,0,0,0

Subband max arfcn=520,560,600,630,660,700,720,760,800,830,885

Subband mid level=7,7,7,7,7,7,7,7,7,7,7

Subband high weight=1.050,1.050,1.050,1.050,1.050,1.000,0.965,0.965,0.965,0.965,0.9650

Subband low weight=1.090,1.090,1.090,1.090,1.090,1.000,0.960,0.960,0.960,0.960,0.9600

Battery compensate, low voltage, low temperature=1.00000

Battery compensate, low voltage, mid temperature=1.00000

Battery compensate, low voltage, high temperature=1.00000

Battery compensate, mid voltage, low temperature=1.00000

Battery compensate, mid voltage, mid temperature=1.00000

Battery compensate, mid voltage, high temperature=1.00000

Battery compensate, high voltage, low temperature=1.00000

Battery compensate, high voltage, mid temperature=1.00000

Battery compensate, high voltage, high temperature=1.00000

TX AFC DAC offset=0

[PCS1900 level, ramp]

APC dc offset=125

Low APC dc offset=0

APC lowest power=0

TX power level=38,44,50,60,71,85,100,120,150,190,230,280,350,430,480,590

profile 0 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 0 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 1 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 1 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 2 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 2 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 3 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 3 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 4 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 4 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 5 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 5 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 6 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 6 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 7 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 7 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 8 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 8 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 9 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 9 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 10 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 10 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 11 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 11 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 12 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 12 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 13 ramp up=0,0,0,0,0,0,1,4,8,30,65,145,219,255,255,255

profile 13 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 14 ramp up=0,0,0,0,0,0,0,1,4,8,30,65,145,219,255,255

profile 14 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 15 ramp up=0,0,0,0,0,0,0,1,4,8,30,65,145,219,255,255

profile 15 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

Subband max arfcn=520,560,600,630,660,680,720,730,750,800,810

Subband mid level=12,12,12,12,12,12,12,12,12,12,12

Subband high weight=1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.0000

Subband low weight=1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.0000

Battery compensate, low voltage, low temperature=1.00000

Battery compensate, low voltage, mid temperature=1.00000

Battery compensate, low voltage, high temperature=1.00000

Battery compensate, mid voltage, low temperature=1.00000

Battery compensate, mid voltage, mid temperature=1.00000

Battery compensate, mid voltage, high temperature=1.00000

Battery compensate, high voltage, low temperature=1.00000

Battery compensate, high voltage, mid temperature=1.00000

Battery compensate, high voltage, high temperature=1.00000

TX AFC DAC offset=0

[GSM850 level, ramp]

APC dc offset=125

Low APC dc offset=0

APC lowest power=5

TX power level=58,64,74,89,107,128,157,187,223,264,313,377,449,522,610,610

profile 0 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 0 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 1 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 1 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 2 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 2 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 3 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 3 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 4 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 4 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 5 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 5 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 6 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 6 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 7 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 7 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 8 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 8 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 9 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 9 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 10 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 10 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 11 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 11 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 12 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 12 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 13 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 13 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 14 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 14 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

profile 15 ramp up=0,0,0,0,0,0,10,20,40,60,80,145,219,255,255,255

profile 15 ramp down=255,239,197,138,78,32,10,0,0,0,0,0,0,0,0,0

Subband max arfcn=150,170,190,210,230,251,-1,0,0,0,0

Subband mid level=16,16,16,16,16,16,19,19,19,19,19

Subband high weight=1.000,1.000,1.000,1.000,1.000,1.000,0.000,0.000,0.000,0.000,0.0000

Subband low weight=1.000,1.000,1.000,1.000,1.000,1.000,0.000,0.000,0.000,0.000,0.0000

Battery compensate, low voltage, low temperature=1.00000

Battery compensate, low voltage, mid temperature=1.00000

Battery compensate, low voltage, high temperature=1.00000

Battery compensate, mid voltage, low temperature=1.00000

Battery compensate, mid voltage, mid temperature=1.00000

Battery compensate, mid voltage, high temperature=1.00000

Battery compensate, high voltage, low temperature=1.00000

Battery compensate, high voltage, mid temperature=1.00000

Battery compensate, high voltage, high temperature=1.00000

TX AFC DAC offset=0

[BT Info]

Crystal CAP ID=255

[ADC control]

offset=32049,27476,32

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值