source: svn/newcon3bcm2_21bu/magnum/portinginterface/ads/7552/bads_def.h

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 23.1 KB
Line 
1/***************************************************************************
2 *     (c)2005-2012 Broadcom Corporation
3 * 
4 *  This program is the proprietary software of Broadcom Corporation and/or its licensors,
5 *  and may only be used, duplicated, modified or distributed pursuant to the terms and
6 *  conditions of a separate, written license agreement executed between you and Broadcom
7 *  (an "Authorized License").  Except as set forth in an Authorized License, Broadcom grants
8 *  no license (express or implied), right to use, or waiver of any kind with respect to the
9 *  Software, and Broadcom expressly reserves all rights in and to the Software and all
10 *  intellectual property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU
11 *  HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY
12 *  NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. 
13 *   
14 *  Except as expressly set forth in the Authorized License,
15 *   
16 *  1.     This program, including its structure, sequence and organization, constitutes the valuable trade
17 *  secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof,
18 *  and to use this information only in connection with your use of Broadcom integrated circuit products.
19 *   
20 *  2.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
21 *  AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
22 *  WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
23 *  THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES
24 *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE,
25 *  LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION
26 *  OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF
27 *  USE OR PERFORMANCE OF THE SOFTWARE.
28 * 
29 *  3.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS
30 *  LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR
31 *  EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR
32 *  USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF
33 *  THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT
34 *  ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
35 *  LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF
36 *  ANY LIMITED REMEDY.
37 *
38 * $brcm_Workfile: bads_def.h $
39 * $brcm_Revision: 39 $
40 * $brcm_Date: 2/22/12 2:09p $
41 *
42 * Module Description:
43 *
44 * Revision History:
45 *
46 * $brcm_Log: /AP/ctfe/core/ads/bads_def.h $
47 *
48 * 39   2/22/12 2:09p farshidf
49 * SW7552-217: Enable Burst mode for DS only for china based on compile
50 *  flag
51 *
52 * Fw_Integration_Devel/14   2/22/12 2:08p farshidf
53 * SW7552-217: Enable Burst mode for DS only for china based on compile
54 *  flag
55 *
56 * Fw_Integration_Devel/AP_V4_0_ADS_DEV/3   2/22/12 2:08p farshidf
57 * SW7552-217: Enable Burst mode for DS only for china based on compile
58 *  flag
59 *
60 * Fw_Integration_Devel/AP_V4_0_ADS_DEV/2   2/21/12 12:03p cbrooks
61 * sw3128-1:disabled Burst Mode for Annex A
62 *
63 * Fw_Integration_Devel/AP_V4_0_ADS_DEV/1   2/20/12 5:40p cbrooks
64 * sw3128-1:Added Burst Noise Enable for Annex A China
65 *
66 * Fw_Integration_Devel/13   12/15/11 12:23p farshidf
67 * SW3461-118: merge to integ
68 *
69 * Fw_Integration_Devel/AP_V3_0_ADS_DEV/7   12/12/11 4:14p cbrooks
70 * sw3128-1:added new coeffs for FOI timing loop
71 *
72 * Fw_Integration_Devel/AP_V3_0_ADS_DEV/6   11/21/11 6:55p mpovich
73 * SW3128-71: Support for a single, common 3128 chip family F/W binary.
74 *
75 * Fw_Integration_Devel/AP_V3_0_ADS_DEV/SW3128-71/1   11/17/11 6:58p mpovich
76 * SW3128-71: Support for common 3128 family chip F/W.
77 *
78 * Fw_Integration_Devel/AP_V3_0_ADS_DEV/5   11/17/11 6:27p mpovich
79 * SW3128-1: Revert INIT_BBS_UNUSED_FLAG5 to ,
80 *  BADS_Internal_Params_eDisable.
81 *
82 * Fw_Integration_Devel/AP_V3_0_ADS_DEV/4   10/31/11 10:50a cbrooks
83 * sw3128-1:added FOI timing loop
84 *
85 * Fw_Integration_Devel/AP_V3_0_ADS_DEV/3   10/31/11 9:39a thayashi
86 * Changed CWC PLL BW
87 *
88 * Fw_Integration_Devel/AP_V3_0_ADS_DEV/2   10/24/11 2:29p cbrooks
89 * sw3128-1:made Taks -1.75 MHz AnnexB CWC only for chips with WFE
90 *
91 * Fw_Integration_Devel/AP_V3_0_ADS_DEV/1   10/21/11 6:16p cbrooks
92 * sw3128-1:added Taks -1.75 MHz CWC spur cancellation for AnnexB
93 *
94 * Fw_Integration_Devel/8   10/12/11 10:40a farshidf
95 * SW3128-54: merge to Integ branch
96 *
97 * Fw_Integration_Devel/AP_V2_0_ADS_DEV/1   10/6/11 11:45a farshidf
98 * SW3128-1: add support for 3128 C0
99 *
100 * 31   8/17/11 8:00p farshidf
101 * SW3461-1: enable INIT_BBS_UNUSED_FLAG6
102 *
103 * 30   8/12/11 3:13p farshidf
104 * SW3461-1: merge to main
105 *
106 * Fw_Integration_Devel/6   8/12/11 2:10p farshidf
107 * SW3461-1: merge to integ
108 *
109 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/16   7/29/11 11:25a cbrooks
110 * sw3128-1:increased stuck fec timeout
111 *
112 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/15   7/28/11 6:44p cbrooks
113 * sw3128-1:Added auto reacquision count attemps for each mode
114 *
115 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/14   7/28/11 4:40p cbrooks
116 * sw3128-1:minor revisions for clarity
117 *
118 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/13   7/27/11 7:58p cbrooks
119 * sw3128-1:disabled acquisition test
120 *
121 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/12   7/25/11 5:49p farshidf
122 * SW3128-1: correction chip ID
123 *
124 * Fw_Integration_Devel/5   7/25/11 5:48p farshidf
125 * SW3128-1: correction chip ID
126 *
127 * 29   7/26/11 6:24p farshidf
128 * SW3128-1: remove 7552 callback
129 *
130 * 28   7/26/11 2:23p farshidf
131 * SWDTV-7869: enable the FFT IRQ for 35233
132 *
133 * 27   7/25/11 5:48p farshidf
134 * SW3128-1: correction of chip ID
135 *
136 * 26   7/25/11 10:34a farshidf
137 * SW3128-1: merge to main
138 *
139 * Fw_Integration_Devel/4   7/25/11 10:19a farshidf
140 * SW3128-1: merge to integ
141 *
142 * Fw_Integration_Devel/3   7/20/11 9:49a farshidf
143 * SW3128-1: B0 support
144 *
145 * Fw_Integration_Devel/2   7/8/11 11:34a farshidf
146 * SW3128-11: merge to integ
147 *
148 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/11   7/22/11 4:51p cbrooks
149 * sw3128-1:Added SLow Scan for RFI interference
150 *
151 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/10   7/18/11 6:37p cbrooks
152 * sw3128-1:temporarily make slow mode same as fast mode
153 *
154 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/9   7/18/11 6:09p cbrooks
155 * sw3128-1:Added Baseband timing loop
156 *
157 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/8   7/18/11 9:59a farshidf
158 * SW3128-28: compile fix
159 *
160 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/7   7/15/11 6:27p farshidf
161 * SWDTV-7869: fix compile error
162 *
163 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/6   7/15/11 6:23p farshidf
164 * SWDTV-7869: add the new flag for B0 chip
165 *
166 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/5   7/15/11 5:40p cbrooks
167 * sw3128-1:added slow acquire for RFI support
168 *
169 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/4   7/14/11 5:25p cbrooks
170 * sw3128-1:enabled callback in 3461
171 *
172 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/3   7/1/11 1:10p cbrooks
173 * sw3128-1:disabled callback in 3461
174 *
175 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/2   7/1/11 12:54p cbrooks
176 * sw3128-1:added callback for 3461
177 *
178 * Fw_Integration_Devel/AP_V0_6_ADS_DEV/1   6/30/11 6:01p cbrooks
179 * sw3128-1:added retry capability
180 *
181 * Fw_Integration_Devel/1   6/29/11 12:38p farshidf
182 * SW3461-13: merge to integration branch
183 *
184 * Fw_Integration_Devel/Ads_Fw_Devel_Rc04/2   6/22/11 6:46p cbrooks
185 * sw3128-1:disabled callback for 3461
186 *
187 * Fw_Integration_Devel/Ads_Fw_Devel_Rc04/1   6/22/11 5:32p cbrooks
188 * sw3128-1:callback spport for 3461
189 *
190 * 21   6/9/11 6:15p mpovich
191 * SW3461-1: Merge Ver 0.4 Integ. onto main branch.
192 *
193 * SW_System_4_Integ_Test/4   6/9/11 2:16p mpovich
194 * SW3461-1: Rebase with main branch.
195 *
196 * 20   6/7/11 6:02p farshidf
197 * SW3128-1: add 3123 support
198 *
199 * 19   6/7/11 3:15p farshidf
200 * SW3128-1: merge to main
201 *
202 * SW_System_4_Integ_Test/3   6/7/11 1:50p farshidf
203 * SW3128-1: sync up with backend
204 *
205 * SW_System_4_Integ_Test/2   6/7/11 11:05a farshidf
206 * SW3128-1: merge to integration branch
207 *
208 * Ads_Fw_Devel_3/5   6/7/11 10:56a cbrooks
209 * sw3128-1:added3461/ 7552 CWC
210 *
211 * Ads_Fw_Devel_3/4   6/6/11 7:50p cbrooks
212 * sw3128-1:Added 3461 CWC spur
213 *
214 * Ads_Fw_Devel_3/3   6/1/11 12:08p cbrooks
215 * sw3128-1:new defs
216 *
217 * Ads_Fw_Devel_3/1   5/27/11 12:28p cbrooks
218 * sw3128-1:Added IMC and CWC
219 *
220 * 18   5/18/11 3:43p farshidf
221 * SW3128-1: compile fix
222 *
223 * 17   5/18/11 3:42p farshidf
224 * SW3128-1: disable callback for 3461
225 *
226 * 16   5/10/11 3:13p farshidf
227 * SW3128-1: merge main
228 *
229 * ADS_3128_3/6   5/7/11 3:53p cbrooks
230 * sw3128-1:clean up
231 *
232 * ADS_3128_3/5   5/7/11 3:47p cbrooks
233 * sw3128-1:corrected freq offset
234 *
235 * ADS_3128_3/4   5/5/11 8:14p cbrooks
236 * sw3128-1:Cleanup Code
237 *
238 * ADS_3128_3/3   5/1/11 3:45p cbrooks
239 * sw3128-1:New Code
240 *
241 * ADS_3128_3/2   5/1/11 3:30p cbrooks
242 * sw3128-1:Cleaned up Channel Scan Code
243 *
244 * ADS_3128_3/1   4/28/11 1:08p cbrooks
245 * sw3128-1:New Code for scan
246 *
247 * 14   4/26/11 6:50p farshidf
248 * SW3128-1: merge main
249 *
250 * ADS_3128_2/5   4/26/11 5:09p farshidf
251 * SW3128-1: merge main
252 *
253 * 13   4/15/11 5:16p farshidf
254 * SW3128-1: update from charlie
255 *
256 * 12   4/15/11 4:39p farshidf
257 * SW3128-1: merge main
258 *
259 * ADS_3128_2/3   4/13/11 5:04p cbrooks
260 * sw3128-1:new cwc code
261 *
262 * ADS_3128_2/2   4/11/11 8:31p cbrooks
263 * SW3128-1:Added CWC code
264 *
265 * ADS_3128_2/1   4/11/11 12:46p cbrooks
266 * sw3128-1:New CWC code
267 *
268 * 11   3/24/11 4:15p farshidf
269 * SW3128-1: add support for 3124
270 *
271 * 10   3/3/11 11:01a farshidf
272 * SW3128-1: clean up
273 *
274 * 8   2/28/11 5:57p cbrooks
275 * sw3128-1:Changed acqwords to internal_params
276 *
277 * 7   2/9/11 10:50a cbrooks
278 * SW3128-1:LIC EST CODE
279 *
280 * 6   1/31/11 7:50p cbrooks
281 * sw3128-1:new code
282 *
283 * 5   1/30/11 6:35p cbrooks
284 * sw3128-1:FFT Code
285 *
286 * 4   1/28/11 4:00p farshidf
287 * SW3461-1: update
288 *
289 * 3   1/28/11 3:45p farshidf
290 * SW3128-1: adapt the files to 3461
291 *
292 * 2   1/26/11 4:13p farshidf
293 * SW3128-1: clean up
294 *
295 ***************************************************************************/
296#ifndef BADS_DEF_H__
297#define BADS_DEF_H__
298
299#ifdef __cplusplus
300extern "C" {
301#endif
302
303/***************************************************************************
304 *  BADS CORE Defines
305 ****************************************************************************/
306#if (BCHP_VER == BCHP_VER_A0)
307#if ((BCHP_CHIP==7552) || (BCHP_CHIP==35233) || (BCHP_FAMILY==3128) || (BCHP_FAMILY==3461))
308#define BCHP_DS_CORE_V_9_1     1
309#endif
310#elif (BCHP_VER == BCHP_VER_B0)
311#if ((BCHP_CHIP==7552) || (BCHP_CHIP==35233) || (BCHP_FAMILY==3128) || (BCHP_FAMILY==3461))
312#define BCHP_DS_CORE_V_9_2     1
313#endif
314#elif (BCHP_VER == BCHP_VER_C0)
315#if ((BCHP_FAMILY==3128))
316#define BCHP_DS_CORE_V_9_3     1
317#endif
318#else
319#error DS core NOT DEFINED in ADS PI
320#endif
321
322/***************************************************************************
323 *  BADS define statements
324 ****************************************************************************/
325#if (BCHP_FAMILY==3128) || (BCHP_FAMILY==3461) || (BCHP_CHIP==7552)
326#define FFT_INTERRUPT 1
327#else
328#define FFT_INTERRUPT 0
329#endif
330#define PRINT_DEBUG 0
331
332#define NUM_FAST_ACQUIRES 1
333#define NUM_SLOW_ACQUIRES 1
334
335/*Define number of times to retry if not locked and we are in Auto Acquire mode for different Acquisition Modes*/
336#define NUM_RETRIES_IF_AUTOACQUIRE_AND_AUTOSELECT 2
337#define NUM_RETRIES_IF_AUTOACQUIRE_AND_FAST 0
338#define NUM_RETRIES_IF_AUTOACQUIRE_AND_SLOW 0
339#define NUM_RETRIES_IF_AUTOACQUIRE_AND_SCAN 0
340
341#define PRE_NYQUIST_FILTER_BW_1MHZ 60 /*This is in KHz*/
342#define AGCBI_MAX_VALUE 0x70000000    /*Max AGCB integrator value to show no signal*/
343
344#define AGC_TIME_SAMPLES 30000          /*Number of F_HS samples for AGC to converge, 15000 = 1 ms for F_HS of 15 MSPS*/
345
346#define TL_TIME_HIGH_BAUD_SAMPLES 15000 /*Number of baud samples for TL to converge, 5000 = 1 ms for Baud rate of 5 MBAUD*/
347#define TL_TIME_MED_BAUD_SAMPLES  10000   
348#define TL_TIME_LOW_BAUD_SAMPLES   5000 
349#define CMA_TIME_BLIND1_BAUD_SAMPLES 30000 /*30000*/
350#define CMA_TIME_BLIND2_BAUD_SAMPLES 20000 /*20000*/
351#define CMA_TIME_LOCKED1_BAUD_SAMPLES 30000 /*30000*/
352#define CMA_TIME_LOCKED2_BAUD_SAMPLES 20000 /*20000*/
353
354#define CMA_TIME_FAST_TRIM_BAUD_SAMPLES 10000 /*10000*/ 
355#define LMS_TIME_FAST_TRIM_BAUD_SAMPLES  10000 /*10000*/
356
357#define CMA_TIME_SLOW_TRIM1_BAUD_SAMPLES 768000   /*Q256/Q128 750000*/
358#define LMS_TIME_SLOW_TRIM1_BAUD_SAMPLES      256000   /*Q256/Q128 250000*/
359
360#define CMA_TIME_SLOW_TRIM2_BAUD_SAMPLES 48000   /*Q64/Q32/Q16 750000*/
361#define LMS_TIME_SLOW_TRIM2_BAUD_SAMPLES      16000   /*Q64/Q32/Q16 250000*/
362
363
364#define ANNEXA_FEC_LOCK_TIMEOUT 20   /*sync timeout in ms*/
365#define ANNEXB_FEC_LOCK_TIMEOUT 40   /*sync timeout in ms*/
366
367#define MAX_PHASE_ERROR 5000
368
369#define NUM_TIMING_FFTS 3                                                       /*1,2, or 3*/
370#define NUM_CARRIER_FFTS 3                                              /*1,2, or 3*/
371
372#define SNR_LEAKY_AVG 512
373
374/*Lock Detector Values*/
375/*Every 1 mS the PI calles the BADS_P_Get_LockStatus function*/
376/*Lock is declared IF the number of clean blocks detected in since the previous call is >= NUM_CLEAN_BLOCKS_TO_LOCK*/
377/*if this condition is not met then*/
378/*Lock is declared if there have NOT been more then NUM_BAD_BLOCK_TO_UNLOCK bad blocks have accumulated*/
379/*if this condition is not met then*/
380/*Unlock is declared  if there have been more then NUM_BAD_BLOCK_TO_UNLOCK bad blocks have accumulated*/
381#define NUM_CLEAN_BLOCKS_TO_LOCK 1
382#define NUM_BAD_BLOCK_TO_UNLOCK 1000
383#define STUCK_FEC_RESET_COUNT 10
384
385/*Acquire Parameter Ranges*/
386#define MAX_CARRIER_RANGE 1000000
387#define MIN_BAUD_RATE 1000000
388#define MAX_BAUD_RATE 7300000
389
390/*Scan Parameter Ranges*/
391#define MAX_CARRIER_SCAN 1000000
392#define MIN_BAUD_SCAN 1000000
393#define MAX_BAUD_SCAN 7300000
394
395#define Q64_ANNEXB_SYMBOL_RATE 5056941
396#define MAX_Q64_ANNEXB_SYMBOL_RATE 5081941
397#define MIN_Q64_ANNEXB_SYMBOL_RATE 5031941
398
399#define Q256_Q1024_ANNEXB_SYMBOL_RATE 5360537
400#define MAX_Q256_Q1024_ANNEXB_SYMBOL_RATE 5385537
401#define MIN_Q256_Q1024_ANNEXB_SYMBOL_RATE 5335537
402
403/*Set the default IF frequency for the BADS_Local_Params structure*/ 
404#define IF_FREQUENCY 0
405
406
407/*Number of CWC to use in manual mode or what type to use in auto mode, if INIT_BBS_CWC==BADS_Internal_Params_eEnable*/
408#define CWC_MODE1       2                                               /*0 disable, 1 for Non-tracking mode (CWC_LFC1 - CWC_LFC4 will be set to 0), 2 for AFC mode, 3 for PLL mode*/
409#define CWC_MODE2       3                       /*the CWC's must be enabled in order, 0 then 1 then 2 etc..*/
410#define CWC_MODE3       3               
411#define CWC_MODE4       3
412#define CWC_AFC_ACQ_BW 0x12800320
413#define CWC_AFC_TRK_BW 0x03200160
414#define CWC_AFC_MU 2
415#define CWC_AFC_LEAK 0
416#define CWC_PLL_ACQ_BW 0x00040064
417#define CWC_PLL_TRK_BW 0x00040064
418#define CWC_PLL_MU 2
419#define CWC_PLL_LEAK 0
420
421/***************************************************************************************/
422/*THE CWC HAS SOME STRANGE PROGRAMMING DO NOT CHANGE THE DEFINITIONS BELOW*/
423/*The chip has a bitwise definition for the AFC/PLL mode but no bitwise RDB representation*/
424/*CWC_ENA needs to be 15, 14, 12, 8 or 0*/
425#define CWC_ACQ_LFC1 ((CWC_MODE1 == 3) ? CWC_PLL_ACQ_BW : CWC_AFC_ACQ_BW)
426#define CWC_ACQ_LFC2 ((CWC_MODE2 == 3) ? CWC_PLL_ACQ_BW : CWC_AFC_ACQ_BW)
427#define CWC_ACQ_LFC3 ((CWC_MODE3 == 3) ? CWC_PLL_ACQ_BW : CWC_AFC_ACQ_BW)
428#define CWC_ACQ_LFC4 ((CWC_MODE4 == 3) ? CWC_PLL_ACQ_BW : CWC_AFC_ACQ_BW)
429#define CWC_TRK_LFC1 ((CWC_MODE1 == 3) ? CWC_PLL_TRK_BW : CWC_AFC_TRK_BW)
430#define CWC_TRK_LFC2 ((CWC_MODE2 == 3) ? CWC_PLL_TRK_BW : CWC_AFC_TRK_BW)
431#define CWC_TRK_LFC3 ((CWC_MODE3 == 3) ? CWC_PLL_TRK_BW : CWC_AFC_TRK_BW)
432#define CWC_TRK_LFC4 ((CWC_MODE4 == 3) ? CWC_PLL_TRK_BW : CWC_AFC_TRK_BW)
433#define CWC_MU1 ((CWC_MODE1 == 3) ? CWC_PLL_MU : CWC_AFC_MU)
434#define CWC_MU2 ((CWC_MODE2 == 3) ? CWC_PLL_MU : CWC_AFC_MU)
435#define CWC_MU3 ((CWC_MODE3 == 3) ? CWC_PLL_MU : CWC_AFC_MU)
436#define CWC_MU4 ((CWC_MODE4 == 3) ? CWC_PLL_MU : CWC_AFC_MU)
437#define CWC_LK1 ((CWC_MODE1 == 3) ? CWC_PLL_LEAK : CWC_AFC_LEAK)
438#define CWC_LK2 ((CWC_MODE2 == 3) ? CWC_PLL_LEAK : CWC_AFC_LEAK)
439#define CWC_LK3 ((CWC_MODE3 == 3) ? CWC_PLL_LEAK : CWC_AFC_LEAK)
440#define CWC_LK4 ((CWC_MODE4 == 3) ? CWC_PLL_LEAK : CWC_AFC_LEAK)
441#define MANUAL_CWC_NUM ((CWC_MODE1 != 0) ? 1 : 0) + ((CWC_MODE2 != 0) ? 1 : 0) + ((CWC_MODE3 != 0) ? 1 : 0) + ((CWC_MODE4 != 0) ? 1 : 0)
442#define CWC_PLL ((CWC_MODE1 == 3) ? 1 : 0) | ((CWC_MODE2 == 3) ? 1 : 0)<<1 | ((CWC_MODE3 == 3) ? 1 : 0)<<2 | ((CWC_MODE4 == 3) ? 1 : 0)<<3
443#define CWC_ENA 15 - (((CWC_MODE1 != 0) ? 1 : 0) | ((CWC_MODE2 != 0) ? 1 : 0)<<1 | ((CWC_MODE3 != 0) ? 1 : 0)<<2 | ((CWC_MODE4 != 0) ? 1 : 0)<<3)
444/***************************************************************************************/
445
446
447/*Initial Values for the BADS_Internal_Params structure*/
448/*Warning!! these can be overwritten by BBS*/
449#define INIT_BBS_RERUN_INIT              BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
450
451#ifdef BADS_ANNEXA_BURST_SUPPORT
452#define INIT_BBS_ANNEXA_BURST_MODE       BADS_Internal_Params_eEnable  /*enable Require only for China Annex A*/
453#else
454#define INIT_BBS_ANNEXA_BURST_MODE       BADS_Internal_Params_eDisable 
455#endif
456
457#if (BCHP_FAMILY==3128) || (BCHP_FAMILY==3461) || (BCHP_CHIP==7552)
458        #define INIT_BBS_CWC                   BADS_Internal_Params_eEnable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
459#else
460        #define INIT_BBS_CWC                   BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
461#endif
462
463#define INIT_BBS_CFL                     BADS_Internal_Params_eEnable  /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
464#define INIT_BBS_CIP_CO_JAMLOAD          BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
465#define INIT_BBS_DDAGC                   BADS_Internal_Params_eEnable  /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
466#define INIT_BBS_IMC                     BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
467#define INIT_BBS_IQPHS                   BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
468#define INIT_BBS_IQIMB                   BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
469#define INIT_BBS_SWEEP_SWITCH            BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
470#define INIT_BBS_SWEEP_NEG2POS_INVERT    BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
471#define INIT_BBS_ACQUISITION_TEST        BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
472#define INIT_BBS_TIMING_SCAN             BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
473#define INIT_BBS_TIMING_SCAN_LOAD        BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
474#define INIT_BBS_CARRIER_SCAN            BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
475#define INIT_BBS_CARRIER_SCAN_LOAD       BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
476#define INIT_BBS_UNUSED_FLAG0            BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
477#define INIT_BBS_UNUSED_FLAG1            BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
478#define INIT_BBS_UNUSED_FLAG2            BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/
479
480#if (BCHP_FAMILY==3128)
481        #define INIT_BBS_UNUSED_FLAG3            BADS_Internal_Params_eEnable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/  /*used as INIT_BBS_VIDEO_CANCELLATION_ANNEX_B: Disable means do not add a CWC at RF Freq - 1.75 MHz, enable means add CWC*/
482#else
483        #define INIT_BBS_UNUSED_FLAG3            BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/  /*used as INIT_BBS_VIDEO_CANCELLATION_ANNEX_B: Disable means do not add a CWC at RF Freq - 1.75 MHz, enable means add CWC*/
484#endif
485
486#define INIT_BBS_UNUSED_FLAG4            BADS_Internal_Params_eEnable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/   /*used as INIT_BBS_DUAL_SCAN: Disable mean one fast scan, Enable for one fast scan then one slow scan*/
487
488#define INIT_BBS_UNUSED_FLAG5            BADS_Internal_Params_eEnable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/   /*used as INIT_BBS_TIMING_FOI: Disable mean transition tracker, Enable for FOI*/
489
490#if (BCHP_FAMILY==3128) || (BCHP_FAMILY==3461) || (BCHP_CHIP==7552)
491        #define INIT_BBS_UNUSED_FLAG6            BADS_Internal_Params_eEnable  /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/ /*used as INIT_BBS_CALLBACK_ENABLE: Disable mean no callback function, use callback function*/
492#else
493        #define INIT_BBS_UNUSED_FLAG6            BADS_Internal_Params_eDisable /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/ /*used as INIT_BBS_CALLBACK_ENABLE: Disable mean no callback function, use callback function*/
494#endif
495
496#define INIT_BBS_UNUSED_FLAG7            BADS_Internal_Params_eEnable    /*BADS_Internal_Params_eDisable or BADS_Internal_Params_eEnable*/ /*used as INIT_BBS_CWC_AUTO: Disable mean manual, Enable for auto*/
497#define INIT_BBS_ACQUISITION_NUMBER      0                                                                              /*uint8_t*/
498#define INIT_BBS_TIMING_SCAN_EXTRA_BINS  1*256                  /*uint16_t, must be in 8.8 format*/
499#define INIT_BBS_CARRIER_SCAN_EXTRA_BINS 1*256                  /*uint16_t, must be in 8.8 format*/
500#define INIT_BBS_TIMING_SCAN_PERCENT     6*256                  /*uint16_t, must be in 8.8 format*/
501#define INIT_BBS_CARRIER_SCAN_PERCENT    2*256                  /*uint16_t, must be in 8.8 format, must be <6.25% or 6.25*256*/
502#define INIT_BBS_TIMING_SCAN_THRESHOLD   0x3000                             /*uint32_t, 17 bits in chip*/
503#define INIT_BBS_CARRIER_SCAN_THRESHOLD  0x3000                 /*uint32_t, 17 bits in chip*/
504#define INIT_BBS_CWC1_FIN1               2000000                /*int32_t, 24 bit signed in chip*/
505#define INIT_BBS_CWC2_FIN2               2000000                /*int32_t, 24 bit signed in chip*/
506#define INIT_BBS_CWC3_FIN3               0                      /*int32_t, 24 bit signed in chip*/
507#define INIT_BBS_CWC4_FIN4               0                      /*int32_t, 24 bit signed in chip*/
508#define INIT_BBS_CWC1_FOFFSET1           0                      /*int32_t, 29 bit signed in chip*/
509#define INIT_BBS_CWC2_FOFFSET2           0                      /*int32_t, 29 bit signed in chip*/
510#define INIT_BBS_CWC3_FOFFSET3           0                      /*int32_t, 29 bit signed in chip*/
511#define INIT_BBS_CWC4_FOFFSET4           0                      /*int32_t, 29 bit signed in chip*/
512#define INIT_BBS_ACQWORD0                0                      /*uint32_t*/
513#define INIT_BBS_ACQWORD1                0                      /*uint32_t*/
514#define INIT_BBS_ACQWORD2                0                      /*uint32_t*/
515#define INIT_BBS_ACQWORD3                0                      /*uint32_t*/
516#define INIT_BBS_ACQWORD4                0                      /*uint32_t*/
517#define INIT_BBS_ACQWORD5                0                      /*uint32_t*/
518#define INIT_BBS_ACQWORD6                0                      /*uint32_t*/    /*used by acquisition test */
519#define INIT_BBS_ACQWORD7                0                      /*uint32_t*/    /*used by acquisition test */
520
521#ifdef __cplusplus
522}
523#endif
524
525#endif
Note: See TracBrowser for help on using the repository browser.