ft_msg_l1rf.h
27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*******************************************************************************
* Modification Notice:
* --------------------------
* This software is modified by MediaTek Inc. and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2001
*
*******************************************************************************/
/*******************************************************************************
* Filename:
* ---------
* ft_msg_l1rf.h
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* Messages definition of L1RF category of FT Library
*
* Author:
* -------
* -------
*
*==============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*==============================================================================
*******************************************************************************/
#ifndef __FT_MSG_L1RF_H__
#define __FT_MSG_L1RF_H__
#include "ft_msg_common.h"
#include "l1d_cid.h"
#include "mph_types.h"
#include "l1tst_public.h"
#include "m12190.h"
/*******************************************************************************
*
* Data structures used in Message Definition
*
*******************************************************************************/
typedef enum
{
FT_RF_PWR_STATE_UNKNOWN = -1,
FT_RF_PWR_STATE_ON,
FT_RF_PWR_STATE_OFF,
}ft_rf_power_state_enum;
typedef enum
{
RF_TEST_CMD_PM = 0
,RF_TEST_CMD_AFC
,RF_TEST_CMD_NB_TX
,RF_TEST_CMD_CONTINUOUS_RX
,RF_TEST_CMD_CONTINUOUS_TX
,RF_TEST_CMD_SET_BB_TX_CFG
,RF_TEST_CMD_BAND_SEL
,RF_TEST_CMD_STOP
,RF_TEST_CMD_MULTISLOT_TX
,RF_TEST_CMD_SET_RAMPAPCLVL
,RF_TEST_CMD_SET_AFCDACVALUE
,RF_TEST_CMD_SET_BBTXCFG2
,RF_TEST_CMD_GET_BBTXCFG2
,RF_TEST_CMD_SET_CRYSTAL_CFG
,RF_TEST_CMD_BBTX_AUTOCAL
,RF_TEST_CMD_QUERY_MS_CAPABILITY
,RF_TEST_CMD_SET_RAMPTABLE
,RF_TEST_CMD_SET_AFC_SINWAVE_DETECTION
,RF_TEST_CMD_MULTISLOT_TX_EX
,RF_TEST_CMD_EPSK_SET_RAMPAPCLVL
,RF_TEST_CMD_GET_RFID
,RF_TEST_CMD_SET_IMMEDIATE_BSI
,RF_TEST_CMD_GET_IMMEDIATE_BSI
,RF_TEST_CMD_SET_SPECIALCOEF
,RF_TEST_CMD_CONTINUOUS_TX_EX
,RF_TEST_CMD_SET_BBTXCFG3
,RF_TEST_CMD_GET_BBTXCFG3
,RF_TEST_CMD_IF_TWO_APC_DC_OFFSET_SUPPORT
,RF_TEST_CMD_CONTINUOUS_TX_EX2
,RF_TEST_CMD_QUERY_MS_CAPABILITY_EX
,RF_TEST_CMD_GET_AFCDACVALUE_AT_RTX_OFFSET_CAL
,RF_TEST_CMD_SET_BBTXCFG4
,RF_TEST_CMD_GET_BBTXCFG4
,RF_TEST_CMD_SET_BBTXCFG5
,RF_TEST_CMD_GET_BBTXCFG5
,RF_TEST_CMD_CALIBRATE_32K
,RF_TEST_CMD_QUERY_MS_CAPABILITY_EX2
,RF_TEST_CMD_START_FDT_DL
,RF_TEST_CMD_START_FDT_UL
,RF_TEST_CMD_EPSK_SET_RAMPTABLE
,RF_TEST_CMD_GET_AFC_DAC_OFFSET
,RF_TEST_CMD_SET_AFC_DAC_OFFSET
,RF_TEST_CMD_SET_BBTXCFG6
,RF_TEST_CMD_GET_BBTXCFG6
,RF_TEST_CMD_GET_FDT_RESULT
,RF_TEST_CMD_START_FDT_DL_NOT_WAIT_RESULT
,RF_TEST_CMD_NSFT_CHANGE_SETTING
,RF_TEST_CMD_NSFT_START
,RF_TEST_CMD_NSFT_STOP
,RF_TEST_CMD_NSFT_CHANGE_POWER
,RF_TEST_CMD_NSFT_START_EPSK_TX
,RF_TEST_CMD_OE_PATTERN_READY
,RF_TEST_CMD_POWER_ON
,RF_TEST_CMD_POWER_OFF
,RF_TEST_CMD_QUERY_POWER_STATE_IN_FT
,RF_TEST_CMD_AFC_TYPE_QUERY_READY
,RF_TEST_CMD_SET_TX_POWER_ROLLBACK_GMSK
,RF_TEST_CMD_SET_TX_POWER_ROLLBACK_EPSK
,RF_TEST_CMD_SET_TX_POWER_ROLLBACK_TABLE_GMSK
,RF_TEST_CMD_SET_TX_POWER_ROLLBACK_TABLE_EPSK
,RF_TEST_CMD_GET_SPECIALCOEF
,RF_TEST_CMD_NSFT_CONFIG_SBER
,RF_TEST_CMD_NSFT_GET_SBER
,RF_TEST_CMD_NSFT_START_RXLEV
,RF_TEST_CMD_NSFT_GET_RXLEV
,RF_TEST_CMD_NSFT_GET_RXQUAL
,RF_TEST_CMD_IF_PM
,RF_TEST_CMD_GET_TXPC_PD_VALUE_BY_PCL_GMSK
,RF_TEST_CMD_GET_TXPC_PD_VALUE_BY_PCL_EPSK
,RF_TEST_CMD_GET_TXPC_PD_VALUE_GMSK
,RF_TEST_CMD_GET_TXPC_PD_VALUE_EPSK
,RF_TEST_CMD_GET_TXPC_SUBBAND_GMSK
,RF_TEST_CMD_GET_TXPC_SUBBAND_EPSK
,RF_TEST_CMD_GET_TXPC_TEMPERATURE
,RF_TEST_CMD_QUERY_MS_CAPABILITY_EX3
/* [LPM CAL] */
,RF_TEST_CMD_SET_DCXO_POWER_MODE
,RF_TEST_CMD_START_FDT_DL_NOT_WAIT_RESULT_EX
,RF_TEST_CMD_GET_FDT_RESULT_EX
,RF_TEST_CMD_SET_EDGE_TX_OCT_PA_SPECIAL_COEF
,RF_TEST_CMD_TXPC_CL_RESET_PD_DATA /**< \brief reset TX power control close loop pd value */
,RF_TEST_CMD_START_FDT_DL_BIG
,RF_TEST_CMD_START_FDT_UL_BIG
,RF_TEST_CMD_GET_FDT_RESULT_BIG
,RF_TEST_CMD_START_FDT_DL_NOT_WAIT_RESULT_BIG
,RF_TEST_CMD_START_FDT_DL_NOT_WAIT_RESULT_EX_BIG
,RF_TEST_CMD_GET_FDT_RESULT_EX_BIG
,RF_TEST_CMD_END
} RfTestCmdType;
typedef enum {
MS_GSM = 0
,MS_GPRS
,MS_EGPRS_RX_ONLY
,MS_EGPRS_FULL_FUNCTION
} MS_CAPABILITY_E;
typedef struct
{
ARFCN arfcn;
kal_int8 sampleNoPerFrame;
/* Resoultion can be up to RSSI_RESOLUTION_BITS bits*/
Gain gain;
kal_int16 frames;
} RfTestCmdPm;
typedef struct
{
ARFCN arfcn;
kal_int16 dacValue;
/* Resoultion can be up to RSSI_RESOLUTION_BITS bits*/
Gain gain;
kal_int16 testNumber;
} RfTestCmdAfc;
typedef struct
{
ARFCN arfcn;
BSIC bsic;
kal_int8 bitmask;
Power txPowerLev;
kal_int16 frames;
kal_int16 dacValue;
APCTxPattern burstTypeNB;
} RfTestCmdNbTx;
typedef struct
{
ARFCN arfcn;
/* Resoultion can be up to RSSI_RESOLUTION_BITS bits*/
Gain gain;
kal_bool onOff;
} RfTestCmdContRx;
typedef struct
{
ARFCN arfcn;
ContTxPattern pattern;
kal_bool onOff;
} RfTestCmdContTx;
typedef struct {
kal_int8 TxTrimI;
kal_int8 TxTrimQ;
kal_int8 TxOffsetI;
kal_int8 TxOffsetQ;
} RfTestCmdSetBBTXCfg;
typedef struct {
kal_int8 TxTrimI;
kal_int8 TxTrimQ;
kal_int8 TxOffsetI;
kal_int8 TxOffsetQ;
kal_int8 TxCalbias;
kal_int8 TxIQSwap;
kal_int8 TxCMV;
kal_int8 TxGain;
kal_int8 TxCalrcsel;
} RfTestCmdSetBBTXCfg2;
typedef struct {
ARFCN arfcn;
BSIC bsic;
kal_int8 timeSlotmask;
Power powerLev[4];
CodingScheme cs[4];
TimingAdvance ta;
kal_int32 frames;
kal_int16 dacValue;
} RfTestCmdMultiSlotTX;
typedef struct {
kal_int32 rf_band;
kal_int32 power_level;
kal_int32 apc_dac;
} RfTestCmdSetRampApcLevel;
typedef struct {
kal_int16 dacValue;
} RfTestCmdSetAfcDacValue;
typedef struct {
kal_int32 cap_id;
} RfTestCmdSetCrystalCfg;
typedef struct {
kal_int32 rf_band;
} RfTestCmdSetRampTable;
typedef struct {
kal_bool is_sinwave;
} RfTestCmdSetAfcSinWave;
typedef struct {
kal_uint32 bsi_data;
} RfTestCmdSetBSI;
typedef struct {
kal_uint32 bsi_addr;
} RfTestCmdGetBSI;
typedef struct {
kal_int8 TxTrimI;
kal_int8 TxTrimQ;
kal_int8 TxOffsetI;
kal_int8 TxOffsetQ;
kal_int8 TxCalbias;
kal_int8 TxIQSwap;
kal_int8 TxCMV;
kal_int8 TxGain;
kal_int8 TxCalrcsel;
kal_int8 TxPhasesel;
} RfTestCmdSetBBTXCfg3;
typedef struct
{
kal_int8 TxTrimI;
kal_int8 TxTrimQ;
kal_int8 TxOffsetI;
kal_int8 TxOffsetQ;
kal_int8 TxCalbias;
kal_int8 TxIQSwap;
kal_int8 TxCMV;
kal_int8 TxGain;
kal_int8 TxCalrcsel;
kal_int8 TxPhasesel;
kal_int8 TxCoarseI;
kal_int8 TxCoarseQ;
}RfTestCmdSetBBTXCfg4;
typedef struct {
ARFCN arfcn;
BSIC bsic;
kal_int8 timeSlotmask;
Power powerLev[4];
CodingScheme cs[4];
TimingAdvance ta;
kal_int32 frames;
kal_int16 dacValue;
APCTxPattern pattern;
kal_uint16 pattern_data;
} RfTestCmdMultiSlotTXEx;
typedef struct {
ARFCN arfcn;
ContTxPattern pattern;
kal_uint16 pattern_data;
kal_bool onOff;
kal_uint16 modtype;
} RfTestCmdContTxEx;
typedef struct {
ARFCN arfcn;
ContTxPattern pattern;
kal_uint16 pattern_data;
kal_bool onOff;
kal_uint16 modtype;
Power powerLev;
} RfTestCmdContTxEx2;
typedef struct{
FrequencyBand band;
ARFCN BCH_ARFCN;
ARFCN TCH_ARFCN;
Gain BCH_gain;
Gain TCH_gain;
TSC tsc;
TimeSlot TCH_slot;
Power tx_power_level;
kal_bool is_EPSK_tx;
CodingScheme epsk_cs;
}RfTestCmdNSFTParam;
typedef struct{
Power tx_power_level;
}RfTestCmdNSFTPowerChangeParam;
// ***************************************** //
// FDT Calibration
// ***************************************** //
#define FT_MAX_STEP_CNT 50
#define FT_MAX_STEP_EX_CNT 100
typedef struct
{
FrequencyBand band;
ARFCN arfcn;
kal_int16 dac_value[33];
Gain gain;
kal_int16 repeat_cnt; // repetitive test counts (frames) for each AFC DAC value
kal_bool capid_cal; // capid calibration ctrl
kal_bool linear_cal; // 33 stages calibration ctrl
//kal_int8 capid_min; // min value for capid range when capid_cal is True; capid when capid_cal is False
//kal_int8 capid_max; // max value for capid range
kal_int32 capid_min; // min value for capid range when capid_cal is True; capid when capid_cal is False
kal_int32 capid_max; // max value for capid range
} RFTestCmdDSSAfc;
typedef struct
{
FrequencyBand band;
ARFCN arfcn;
Gain gain[6]; // gain for rx slot 0/1/2/3/4/5
kal_int16 repeat_cnt; // repetitive test counts (frames) for each ARFCN value
//kal_int16 dac_value; // Use InitDacValue from AFC calibration when dacValue = 0 (or -1)
} RFTestCmdDSSPL;
typedef struct
{
kal_bool afc_cal;
kal_bool pl_cal; // Control whether Path loss calibration is needed or not
kal_int8 sync_sb_num; // the SB frame numbers needed for sync process before path loss calibration
kal_int16 power; // the power level expected to measure from test set
RFTestCmdDSSAfc AfcDSS;
kal_int8 step_cnt;
RFTestCmdDSSPL PathLossDSS[FT_MAX_STEP_CNT-2];
} RFTestCmdDTS;
typedef struct
{
kal_bool afc_cal;
kal_bool pl_cal;
kal_int8 sync_sb_num;
kal_int16 power;
RFTestCmdDSSAfc AfcDSS;
kal_int8 step_cnt;
RFTestCmdDSSPL PathLossDSS[FT_MAX_STEP_EX_CNT-2];
}RFTestCmdDTSBig;
/* [LPM CAL] */
typedef struct
{
kal_bool afc_cal;
kal_bool pl_cal; // Control whether Path loss calibration is needed or not
kal_int8 sync_sb_num; // the SB frame numbers needed for sync process before path loss calibration
kal_int16 power; // the power level expected to measure from test set
RFTestCmdDSSAfc AfcDSS;
kal_int8 step_cnt;
RFTestCmdDSSPL PathLossDSS[FT_MAX_STEP_CNT-2];
kal_int16 lpm_sb_num;
} RFTestCmdDTS_Ex;
typedef struct
{
kal_bool afc_cal;
kal_bool pl_cal;
kal_int8 sync_sb_num;
kal_int16 power;
RFTestCmdDSSAfc AfcDSS;
kal_int8 step_cnt;
RFTestCmdDSSPL PathLossDSS[FT_MAX_STEP_EX_CNT-2];
kal_int16 lpm_sb_num;
}RFTestCmdDTS_Big_Ex;
typedef struct
{
FrequencyBand band;
ARFCN arfcn;
kal_int8 timeslot_per_frame;
kal_int8 apc_dac_pcl_sel; // 1: apc_dac, 0: apc_pcl
kal_int16 apc_dac_pcl_value[4];
//kal_uint8 pa_vbias_val;
kal_uint8 pa_vbias_val[4];
kal_uint8 is_low_pcl[4];
CodingScheme cs[4];
kal_int32 repeat_cnt;
kal_int16 afc_dac_value;
kal_int8 tsc;
APCTxPattern pattern;
kal_uint16 pattern_data;
} RfTestCmdUSSApc;
typedef struct
{
//kal_bool pa_vbias_cal; // Control whether PA need to calibrate different Vbias value when APC DAC is used
kal_int8 step_cnt;
kal_int16 high_apc_dcoffset[FrequencyBandCount];
// kal_int32 lowest_power[FrequencyBandCount];
RfTestCmdUSSApc ApcUSS[FT_MAX_STEP_CNT];
}RfTestCmdUTS;
typedef struct
{
kal_int8 step_cnt;
kal_int16 high_apc_dcoffset[FrequencyBandCount];
RfTestCmdUSSApc ApcUSS[FT_MAX_STEP_EX_CNT];
}RfTestCmdUTSBig;
typedef struct
{
//kal_int32 rf_band;
kal_int16 afc_offset[FrequencyBandCount];
}RF_SET_AFC_DAC_OFFSET_REQ_T;
typedef struct
{
kal_int32 band;
sTX_POWER_ROLLBACK PowerRollbackTable;
}RfTestCmdSetPowerRollbackTable;
/**
* The RfTestCmdIrPm is used for IRR w coeffiecient calibration
* The command is analogous to RfTestCmdPm, except the m_IfFlag
*/
typedef struct
{
/// power scan input parameter
RfTestCmdPm m_Pm;
/// if_flag for the power scan (to override the if setting in power scan, the original interface is not changed)
kal_int8 m_IfFlag;
}RfTestCmdIrPm;
typedef struct
{
FrequencyBand band;
Power pcl;
}RfTestCmdTXPC;
// ***************************************** //
typedef union
{
RfTestCmdPm pm;
RfTestCmdAfc afc;
RfTestCmdNbTx nbTx;
RfTestCmdContRx contRx;
RfTestCmdContTx contTx;
RfTestCmdSetBBTXCfg setBBTXCfg;
kal_bool selectPCS1900;
kal_int8 dummy;
RfTestCmdMultiSlotTX msTx;
RfTestCmdSetRampApcLevel setRampApcLevel;
RfTestCmdSetAfcDacValue setAfcDacValue;
RfTestCmdSetBBTXCfg2 BBTxCfg2;
RfTestCmdSetCrystalCfg setCrystalCfg;
RfTestCmdSetRampTable setRampTable;
RfTestCmdSetAfcSinWave setAfcSinWave;
RfTestCmdSetBSI SetBSI;
RfTestCmdGetBSI GetBSI;
RfTestCmdSetBBTXCfg3 BBTxCfg3;
RfTestCmdMultiSlotTXEx msTxEx;
RfTestCmdContTxEx contTxEx;
RfTestCmdContTxEx2 contTxEx2;
RfTestCmdSetBBTXCfg4 BBTxCfg4;
RF_SET_AFC_DAC_OFFSET_REQ_T set_afc_offset_req;
RfTestCmdNSFTParam NSFT_start;
RfTestCmdNSFTPowerChangeParam NSFT_change_power;
RfTestCmdSetPowerRollbackTable PowerRollbackTable;
kal_uint32 m_u4NSFTSBERTestCount;
/// for L1TST_ReportRXQual input
kal_uint16 m_u2NSFTRxQualBerDecile;
/// for SOC2 IRR W PM
RfTestCmdIrPm m_IrPm;
RfTestCmdTXPC txpc_req;
/// for L1TST_TXPC_CL_GetSubband input
kal_uint8 band;
/* [LPM CAL] */
/// for DCXO FPM/LPM control (1 FPM, 0 LPM)
kal_uint8 dcxoMode;
} RfTestCmdParam;
/* ---------------------------------- */
typedef struct
{
/* Resoultion can be up to RSSI_RESOLUTION_BITS bits*/
kal_int32 power;
/* Resoultion can be up to RSSI_RESOLUTION_BITS*2 bits*/
kal_int32 deviation;
/* Resoultion can be up to RSSI_RESOLUTION_BITS bits*/
Gain usedGain;
kal_int32 ok;
kal_int32 iOffset;
kal_int32 qOffset;
kal_int32 validSamples;
} RfTestResultPm;
typedef struct
{
kal_int16 fcb_ok_number;
kal_int32 freqOffset;
kal_int32 deviation;
kal_int32 ok;
} RfTestResultAfc;
typedef struct {
kal_bool ok;
RfTestCmdSetBBTXCfg2 bbtx_cfg;
} RfTestResultGetBBTXCfg2;
typedef struct {
kal_uint32 GSM400;
kal_uint32 GSM850;
kal_uint32 GSM900;
kal_uint32 DCS1800;
kal_uint32 PCS1900;
} RfTestResultBandSupport;
typedef struct {
kal_bool ok;
MS_CAPABILITY_E capability;
RfTestResultBandSupport band_support;
} RfTestResultMsCapability;
/*
#define MS_CAPABILITY_GSM 0x00000001
#define MS_CAPABILITY_GPRS 0x00000002
#define MS_CAPABILITY_EDGE_RX 0x00000004
#define MS_CAPABILITY_EDGE_8PSK_TX 0x00000008
#define MS_CAPABILITY_8PM 0x00000010
#define MS_BAND_SUPPORT_GSM400 0x00000001
#define MS_BAND_SUPPORT_GSM850 0x00000002
#define MS_BAND_SUPPORT_GSM900 0x00000004
#define MS_BAND_SUPPORT_DCS1800 0x00000008
#define MS_BAND_SUPPORT_PCS1900 0x00000010
*/
typedef struct
{
kal_uint32 capability;
kal_uint32 band_support;
}RfResultMsCapabilityEx;
typedef struct {
kal_bool ok;
kal_uint32 capability;
kal_uint32 band_support;
} RfTestResultMsCapabilityEx;
typedef struct {
kal_bool ok;
kal_uint32 id;
} RfTestResultGetRFID;
typedef struct {
kal_bool ok;
kal_uint32 bsi_data;
} RfTestResultGetBSI;
typedef struct {
kal_bool ok;
RfTestCmdSetBBTXCfg3 bbtx_cfg;
} RfTestResultGetBBTXCfg3;
typedef struct
{
kal_bool ok;
RfTestCmdSetBBTXCfg4 bbtx_cfg;
}RfTestResultGetBBTXCfg4;
typedef struct {
kal_bool ok;
kal_int16 dacValue;
} RfGetAfcDacValueAtRTXOffsetCal;
typedef struct
{
kal_bool ok;
kal_int32 calibra_result_32k;
}RfTestResult32kCalibration;
// ****************************** //
// FDT Calibration
// ****************************** //
typedef struct
{
kal_int32 power[FT_MAX_STEP_CNT-2];
kal_int16 valid_sample[FT_MAX_STEP_CNT-2];
kal_bool ok;
} RfTestResultDSSPL;
typedef struct
{
kal_int32 power[FT_MAX_STEP_EX_CNT-2];
kal_int16 valid_sample[FT_MAX_STEP_EX_CNT-2];
kal_bool ok;
} RfTestResultDSSPLBig;
typedef struct
{
kal_int32 freq_offset[33]; // only valid when 33 stage calibration is ON
kal_int32 deviation[33]; // only valid when 33 stage calibration is ON
kal_int16 fcb_ok_number[33];
//kal_int8 capid; // only valid when capid calibration is ON
kal_int32 capid; // only valid when capid calibration is ON
kal_int16 init_dac_value; // only valid when 33 stage calibration is OFF
kal_int32 slope; // only valid when 33 stage calibration is OFF
kal_bool ok;
} RfTestResultDSSAfc;
/* [LPM CAL] */
typedef struct
{
kal_int32 cload_freq_offset;
kal_bool ok;
kal_bool is_perform_cal;
} RfTestResultDSSLpm;
#if IS_FHC_SUPPORT == 1
typedef struct
{
kal_int32 path_loss_cnt;
kal_int32 freq_offset;
kal_int32 capid_freq_offset_min;
kal_int32 capid_freq_offset[FHC_MAX_CAPID_SEARCH_NUM]; // 16
kal_int32 capid_search_order[FHC_MAX_CAPID_SEARCH_NUM]; // 16
kal_int32 capid;
kal_int32 capid_high;
kal_int32 capid_low;
kal_int32 capid_best;
kal_int16 afc_dac;
kal_int16 arfcn;
kal_int16 capid_cnt;
kal_int16 repeat_index;
kal_int8 state;
kal_int8 capid_index;
kal_int8 capid_okay_cnt;
kal_int8 afc_dac_index;
kal_int8 sb_okay_cnt;
kal_uint8 sb_fail_cnt;
kal_uint8 fb_fail_cnt;
kal_bool pl_started;
kal_bool pre_capid_cal_ok[FHC_PRE_CAPID_SEARCH_NUM]; // FHC_PRE_CAPID_SEARCH_NUM
}RfTestResultDtsmInfo;
#else
typedef struct
{
kal_int32 path_loss_cnt;
kal_int32 freq_offset;
kal_int32 capid_freq_offset_min;
kal_int32 capid_freq_offset[16]; //FHC_MAX_CAPID_SEARCH_NUM
kal_int32 capid_search_order[16]; //FHC_MAX_CAPID_SEARCH_NUM
kal_int32 capid;
kal_int32 capid_high;
kal_int32 capid_low;
kal_int32 capid_best;
kal_int16 afc_dac;
kal_int16 arfcn;
kal_int16 capid_cnt;
kal_int16 repeat_index;
kal_int8 state;
kal_int8 capid_index;
kal_int8 capid_okay_cnt;
kal_int8 afc_dac_index;
kal_int8 sb_okay_cnt;
kal_uint8 sb_fail_cnt;
kal_uint8 fb_fail_cnt;
kal_bool pl_started;
kal_bool pre_capid_cal_ok[9]; // FHC_PRE_CAPID_SEARCH_NUM
}RfTestResultDtsmInfo;
#endif
typedef enum {
DTS_RESULT_READY = 0, // DTS results is ready to get back
DTS_RESULT_NOT_READY, // DTS result is still in progress and not ready to get back
DTS_RESULT_NOT_REQUESTED, // Haven't called the META_Rf_StartFdtDL() in advance.
DTS_FATAL_ERROR
}RF_DTS_GET_RESULT_STATUS;
typedef struct
{
RfTestResultDSSPL PLResult;
RfTestResultDSSAfc AfcResult;
RfTestResultDtsmInfo m_rDtsmInfo; // for L1 debug use, will print in META Tool's test report.
} RfTestResultDTS;
typedef struct
{
RfTestResultDSSPLBig PLResult;
RfTestResultDSSAfc AfcResult;
RfTestResultDtsmInfo m_rDtsmInfo; // for L1 debug use, will print in META Tool's test report.
} RfTestResultDTSBig;
/* [LPM CAL] */
typedef struct
{
RfTestResultDSSPL PLResult;
RfTestResultDSSAfc AfcResult;
RfTestResultDtsmInfo m_rDtsmInfo;
/* crystal low power mode calibration result (for 32k removal) */
RfTestResultDSSLpm LpmResult;
} RfTestResultDTS_Ex;
typedef struct
{
RfTestResultDSSPLBig PLResult;
RfTestResultDSSAfc AfcResult;
RfTestResultDtsmInfo m_rDtsmInfo;
/* crystal low power mode calibration result (for 32k removal) */
RfTestResultDSSLpm LpmResult;
} RfTestResultDTS_Big_Ex;
typedef struct
{
kal_int16 afc_offset[FrequencyBandCount];
kal_bool ok;
}RfGetAfcOffsetResult;
typedef struct
{
kal_uint32 m_u4NSFTSBER;
kal_uint32 m_u4NSFTSBERCurrentCount;
}RfNSFTSBERResult;
// local
typedef struct
{
kal_bool ok;
kal_uint16 m_u2PDValue;
}RfTestResultPDValue;
// peer
typedef struct
{
kal_uint16 data[16];
} RfTestResultTXPCPD;
typedef struct
{
kal_uint16 data[8];
} RfTestResultTXPCPDTemp;
typedef struct
{
/// calibrated flag
kal_int8 is_calibrated;
/// closed-loop target value by PCL
RfTestResultTXPCPD adc[FrequencyBandCount];
/// temperature compensation interval
kal_int16 temperature;
/// closed-loop target value by temperature compensation
RfTestResultTXPCPDTemp temp[FrequencyBandCount];
}RfTestResultTXPCAllPD;
// ****************************** //
typedef union
{
RfTestResultPm pm;
RfTestResultAfc afc;
kal_bool ok;
RfTestResultGetBBTXCfg2 BBTxCfg2;
RfTestResultMsCapability ms_capability;
RfTestResultGetRFID rfid;
RfTestResultGetBSI GetBSI;
RfTestResultGetBBTXCfg3 BBTxCfg3;
RfTestResultMsCapabilityEx ms_capability_ex;
RfGetAfcDacValueAtRTXOffsetCal GetAfcDacValueAtRTXOffsetCal;
RfTestResultGetBBTXCfg4 BBTxCfg4;
RfTestResult32kCalibration calibration_32k;
RfGetAfcOffsetResult afc_result;
RF_DTS_GET_RESULT_STATUS dts_get_result_status;
kal_int8 m_i1RfPwrState_FT;
RfNSFTSBERResult m_rNSFTSBER;
/// L1TST_ReportRXLEV output
kal_uint16 m_u2NSFTRxLevel;
/// L1TST_ReportRXQual output
kal_uint8 m_u1NSFTRxQual;
RfTestResultPDValue txpc_cnf;
/// L1TST_TXPC_CL_GetSubband output
kal_uint16 m_txpc_subband_compensation[11];
/// L1TST_TXPC_GetTemperature output: RF_TEST_CMD_GET_TXPC_TEMPERATURE
kal_uint16 temperature;
} RfTestResultParam;
/*******************************************************************************
*
* Message structures defined for L1TST Interface
*
*******************************************************************************/
typedef struct
{
FT_H header;
RfTestCmdType type;
RfTestCmdParam param;
} ft_rf_test_req_T;
typedef struct
{
FT_H header;
RfTestCmdType type;
RfTestResultParam param;
} ft_rf_test_cnf_T;
#endif // #ifndef __FT_MSG_L1RF_H__