FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/L1/include/l1_confg.h @ 532:d9fd344d7570
gsm-fw/L1/include/l1_confg.h: FC changes reapplied to LoCosto-based version
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Fri, 01 Aug 2014 18:07:16 +0000 |
parents | de635895e0be |
children | b1e2dbb3c751 |
comparison
equal
deleted
inserted
replaced
531:de635895e0be | 532:d9fd344d7570 |
---|---|
7 * | 7 * |
8 ************* Revision Controle System Header *************/ | 8 ************* Revision Controle System Header *************/ |
9 | 9 |
10 #ifndef __L1_CONFG_H__ | 10 #ifndef __L1_CONFG_H__ |
11 #define __L1_CONFG_H__ | 11 #define __L1_CONFG_H__ |
12 | |
13 #ifndef _WINDOWS | |
14 #include "l1sw.cfg" // Configuration Software | |
15 #include "board.cfg" | |
16 #include "chipset.cfg" | |
17 #include "rf.cfg" | |
18 #include "swconfig.cfg" | |
19 #include "sys.cfg" | |
20 #endif | |
21 | 12 |
22 // Traces... | 13 // Traces... |
23 // TRACE_TYPE == 1,2,3 are used in standalone mode (L2-L3 Simul) with USART | 14 // TRACE_TYPE == 1,2,3 are used in standalone mode (L2-L3 Simul) with USART |
24 // TRACE_TYPE == 4 is used on A-sample only (with UART): L1 + protocol stack | 15 // TRACE_TYPE == 4 is used on A-sample only (with UART): L1 + protocol stack |
25 // TRACE_TYPE == 1 -> L1/L3 interface trace | 16 // TRACE_TYPE == 1 -> L1/L3 interface trace |
61 #endif | 52 #endif |
62 | 53 |
63 //============ | 54 //============ |
64 // CODE CHOICE | 55 // CODE CHOICE |
65 //============ | 56 //============ |
57 #if 0 | |
66 #if (OP_L1_STANDALONE==0) | 58 #if (OP_L1_STANDALONE==0) |
67 #define CODE_VERSION NOT_SIMULATION | 59 #define CODE_VERSION NOT_SIMULATION |
68 #else // OP_L1_STANDALONE | 60 #else // OP_L1_STANDALONE |
69 #ifdef WIN32 | 61 #ifdef WIN32 |
70 #define CODE_VERSION SIMULATION | 62 #define CODE_VERSION SIMULATION |
71 #else // WIN32 | 63 #else // WIN32 |
72 #define CODE_VERSION NOT_SIMULATION | 64 #define CODE_VERSION NOT_SIMULATION |
73 #endif // WIN32 | 65 #endif // WIN32 |
74 #endif // OP_L1_STANDALONE | 66 #endif // OP_L1_STANDALONE |
67 #endif // #if 0 | |
68 | |
69 /* FreeCalypso */ | |
70 #define CODE_VERSION NOT_SIMULATION | |
71 #define AMR 1 | |
72 #define L1_12NEIGH 1 | |
73 #define L1_DYN_DSP_DWNLD 0 /* for now */ | |
74 #define L1_EOTD 0 | |
75 #define L1_GTT 0 | |
76 #define ORDER2_TX_TEMP_CAL 1 | |
77 #define TRACE_TYPE 4 | |
78 #define VCXO_ALGO 1 | |
79 | |
80 /* TESTMODE will be enabled with feature l1tm */ | |
81 | |
82 #if CONFIG_AUDIO | |
83 # define AUDIO_TASK 1 // Enable the L1 audio features | |
84 # define MELODY_E2 1 | |
85 #endif | |
86 | |
87 #if CONFIG_GPRS | |
88 # define L1_GPRS 1 | |
89 #else | |
90 # define L1_GPRS 0 | |
91 #endif | |
92 | |
75 //--------------------------------------------------------------------------------- | 93 //--------------------------------------------------------------------------------- |
76 // Test with full simulation. | 94 // Test with full simulation. |
77 //--------------------------------------------------------------------------------- | 95 //--------------------------------------------------------------------------------- |
78 #if (CODE_VERSION == SIMULATION) | 96 #if (CODE_VERSION == SIMULATION) |
79 | 97 |
199 #endif | 217 #endif |
200 #else | 218 #else |
201 #define GSM_IDLE_RAM_DEBUG 0 | 219 #define GSM_IDLE_RAM_DEBUG 0 |
202 #endif | 220 #endif |
203 | 221 |
204 #define L1_VPM 1 | 222 //FreeCalypso: L1_VPM commented out, as I suspect it's a LoCosto-ism |
223 //#define L1_VPM 1 | |
224 | |
205 #if (OP_L1_STANDALONE == 1) | 225 #if (OP_L1_STANDALONE == 1) |
206 #if (CHIPSET == 15) | 226 #if (CHIPSET == 15) |
207 #if ((BOARD == 71) && (FLASH == 0)) | 227 #if ((BOARD == 71) && (FLASH == 0)) |
208 // Not possible in I-SAMPLE only RAM configuration as there will | 228 // Not possible in I-SAMPLE only RAM configuration as there will |
209 // not be enough memory space | 229 // not be enough memory space |
249 #define NEW_WKA_PATCH 0 | 269 #define NEW_WKA_PATCH 0 |
250 #define OPTIMISED 0 | 270 #define OPTIMISED 0 |
251 | 271 |
252 #endif | 272 #endif |
253 | 273 |
274 /* | |
275 * FreeCalypso: these FF_L1_IT_DSP_USF and FF_L1_IT_DSP_DTX features (?) | |
276 * are new with the LoCosto L1 headers, i.e., not present in the Leonardo | |
277 * headers. I have no idea what they are, and I suspect they may likely | |
278 * be something that won't work on our Calypso platform, so I'm disabling | |
279 * them for now. | |
280 */ | |
281 | |
254 #undef FF_L1_IT_DSP_USF | 282 #undef FF_L1_IT_DSP_USF |
255 #if (L1_GPRS == 1) | 283 #if 0 //(L1_GPRS == 1) |
256 #define FF_L1_IT_DSP_USF 1 | 284 #define FF_L1_IT_DSP_USF 1 |
257 #else | 285 #else |
258 #define FF_L1_IT_DSP_USF 0 | 286 #define FF_L1_IT_DSP_USF 0 |
259 #endif | 287 #endif |
260 #undef FF_L1_IT_DSP_DTX | 288 #undef FF_L1_IT_DSP_DTX |
261 #if (AMR == 1) | 289 #if 0 //(AMR == 1) |
262 #define FF_L1_IT_DSP_DTX 1 | 290 #define FF_L1_IT_DSP_DTX 1 |
263 #else | 291 #else |
264 #define FF_L1_IT_DSP_DTX 0 | 292 #define FF_L1_IT_DSP_DTX 0 |
265 #endif | 293 #endif |
266 | 294 |
294 #define FACCH_TEST 0 // FACCH test enabled. | 322 #define FACCH_TEST 0 // FACCH test enabled. |
295 | 323 |
296 #define ADC_TIMER_ON 0 // Timer for ADC measurements | 324 #define ADC_TIMER_ON 0 // Timer for ADC measurements |
297 #define AFC_ON 1 // Enable of the Omega AFC module | 325 #define AFC_ON 1 // Enable of the Omega AFC module |
298 | 326 |
327 #if 0 | |
328 /* FreeCalypso: moved to config section above */ | |
299 #define AUDIO_TASK 1 // Enable the L1 audio features | 329 #define AUDIO_TASK 1 // Enable the L1 audio features |
330 #endif | |
300 #define AUDIO_SIMULATION 0 // Audio simulator for the audio tasks (works only with the new audio design i.e. AUDIO_TASK=1) | 331 #define AUDIO_SIMULATION 0 // Audio simulator for the audio tasks (works only with the new audio design i.e. AUDIO_TASK=1) |
301 #if (OP_L1_STANDALONE == 1) | 332 #if (OP_L1_STANDALONE == 1) |
302 #define AUDIO_L1_STANDALONE 1 // Flag to enable the audio simulator used with the L1 stand-alone (works only with the new audio design i.e. AUDIO_TASK=1) | 333 #define AUDIO_L1_STANDALONE 1 // Flag to enable the audio simulator used with the L1 stand-alone (works only with the new audio design i.e. AUDIO_TASK=1) |
303 #else | 334 #else |
304 #define AUDIO_L1_STANDALONE 0 | 335 #define AUDIO_L1_STANDALONE 0 |
373 #define VOICE_MEMO 1 // Enable voice memorization feature | 404 #define VOICE_MEMO 1 // Enable voice memorization feature |
374 #else | 405 #else |
375 #define VOICE_MEMO 0 | 406 #define VOICE_MEMO 0 |
376 #endif | 407 #endif |
377 #define FIR 1 // Enable FIR feature | 408 #define FIR 1 // Enable FIR feature |
378 #if (DSP == 33) || (DSP == 34) || (DSP == 35) || (DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39) | 409 #if (DSP >= 33) |
379 #define AUDIO_MODE 1 // Enable Audio mode feature | 410 #define AUDIO_MODE 1 // Enable Audio mode feature |
380 #else | 411 #else |
381 #define AUDIO_MODE 0 // Disable Audio mode feature | 412 #define AUDIO_MODE 0 // Disable Audio mode feature |
382 #endif | 413 #endif |
383 #else | 414 #else |
402 #define MELODY_E1 0 // Enable melody format E1 feature | 433 #define MELODY_E1 0 // Enable melody format E1 feature |
403 #define VOICE_MEMO 0 // Enable voice memorization feature | 434 #define VOICE_MEMO 0 // Enable voice memorization feature |
404 #define FIR 0 // Enable FIR feature | 435 #define FIR 0 // Enable FIR feature |
405 #define AUDIO_MODE 0 // Enable Audio mode feature | 436 #define AUDIO_MODE 0 // Enable Audio mode feature |
406 #endif | 437 #endif |
407 #define L1_MIDI_BUFFER 1 | 438 |
439 //FreeCalypso: LoCosto-ism below disabled | |
440 //#define L1_MIDI_BUFFER 1 | |
441 | |
442 /* | |
443 * L1_CPORT appears in the Leonardo L1 headers, and is enabled only for | |
444 * CHIPSET 12. The LoCosto version doesn't have it at all. | |
445 */ | |
446 #define L1_CPORT 0 | |
408 | 447 |
409 #define L1_AUDIO_BACKGROUND_TASK (SPEECH_RECO | MELODY_E2) // audio background task is used by speech reco and melody_e2 | 448 #define L1_AUDIO_BACKGROUND_TASK (SPEECH_RECO | MELODY_E2) // audio background task is used by speech reco and melody_e2 |
410 #if (OP_RIV_AUDIO == 1) | 449 #if (OP_RIV_AUDIO == 1) |
411 #define L1_AUDIO_DRIVER (L1_VOICE_MEMO_AMR | L1_EXT_AUDIO_MGT | L1_MP3) // Riviera audio driver (only Voice Memo AMR is available) | 450 #define L1_AUDIO_DRIVER (L1_VOICE_MEMO_AMR | L1_EXT_AUDIO_MGT | L1_MP3) // Riviera audio driver (only Voice Memo AMR is available) |
412 #endif | 451 #endif |
876 | 915 |
877 // masks to apply on d_error_status bit field for DSP patch 0x2061 or 0x2062 | 916 // masks to apply on d_error_status bit field for DSP patch 0x2061 or 0x2062 |
878 #define DSP_DEBUG_GSM_MASK 0x08BD // L1_MCU-SPR-15852 | 917 #define DSP_DEBUG_GSM_MASK 0x08BD // L1_MCU-SPR-15852 |
879 #define DSP_DEBUG_GPRS_MASK 0x0f3d | 918 #define DSP_DEBUG_GPRS_MASK 0x0f3d |
880 #endif | 919 #endif |
881 #elif (DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39) // ROM Code GPRS AMR. | 920 #elif (DSP >= 36) // ROM Code GPRS AMR. |
882 | 921 |
883 #if ((L1_PCM_EXTRACTION) && (SPEECH_RECO)) | 922 #if ((L1_PCM_EXTRACTION) && (SPEECH_RECO)) |
884 #error "PCM extraction and Speech recognition not supported simultaneously" | 923 #error "PCM extraction and Speech recognition not supported simultaneously" |
885 #endif | 924 #endif |
886 | 925 |
887 #define CLKMOD1 0x4006 // ... | 926 #define CLKMOD1 0x4006 // ... |
888 #define CLKMOD2 0x4116 // ...65 Mips pll free | 927 #define CLKMOD2 0x4116 // ...65 Mips pll free |
889 #define CLKSTART 0x29 // ...65 Mips | 928 #define CLKSTART 0x29 // ...65 Mips |
890 #define C_PLL_CONFIG 0x154 // For VTCXO = 13 MHz and max DSP speed = 84.5 Mips | 929 #define C_PLL_CONFIG 0x154 // For VTCXO = 13 MHz and max DSP speed = 84.5 Mips |
891 #define VOC FR_HR_EFR // FR + HR + EFR (normaly FR_EFR : PBs). | 930 #define VOC FR_HR_EFR // FR + HR + EFR (normaly FR_EFR : PBs). |
931 | |
932 #if 0 | |
933 /* what we got with LoCosto L1 headers */ | |
892 #define AEC 0 // AEC/NS not supported. | 934 #define AEC 0 // AEC/NS not supported. |
935 #define L1_NEW_AEC 0 | |
936 #else | |
937 /* what we are used to from the Leonardo version */ | |
938 #define AEC 1 // AEC/NS not supported. | |
939 #if (OP_RIV_AUDIO == 0) | |
940 #define L1_NEW_AEC 1 | |
941 #else | |
942 // Available but not yet tuned with Riviera AUDIO | |
893 #define L1_NEW_AEC 0 | 943 #define L1_NEW_AEC 0 |
944 #endif | |
945 #endif | |
894 | 946 |
895 #if ((L1_NEW_AEC) && (!AEC)) | 947 #if ((L1_NEW_AEC) && (!AEC)) |
896 // First undef the flag to avoid warnings at compilation time | 948 // First undef the flag to avoid warnings at compilation time |
897 #undef AEC | 949 #undef AEC |
898 #define AEC 1 | 950 #define AEC 1 |