FreeCalypso > hg > fc-magnetite
comparison src/cs/layer1/cust0/l1_rf12.h @ 315:8cc745104906
compiled-in afcparams numbers for Compal and Pirelli targets
now match those used by their respective original firmwares
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 16 Nov 2017 05:43:03 +0000 |
parents | 945cf7f506b2 |
children | 395e464e4005 |
comparison
equal
deleted
inserted
replaced
314:a90812ea82c9 | 315:8cc745104906 |
---|---|
6 * | 6 * |
7 ************* Revision Controle System Header *************/ | 7 ************* Revision Controle System Header *************/ |
8 | 8 |
9 #ifndef __L1_RF_H__ | 9 #ifndef __L1_RF_H__ |
10 #define __L1_RF_H__ | 10 #define __L1_RF_H__ |
11 | |
12 #include "fc-target.cfg" | |
11 | 13 |
12 #define RF_RITA_10 0x2030 // Check with TIDK | 14 #define RF_RITA_10 0x2030 // Check with TIDK |
13 | 15 |
14 //#define RF_HW_BAND_EGSM | 16 //#define RF_HW_BAND_EGSM |
15 //#define RF_HW_BAND_DCS | 17 //#define RF_HW_BAND_DCS |
247 /* (1) = (2*pi*2.4*16*0.9) / (4096*1*270.83) */ | 249 /* (1) = (2*pi*2.4*16*0.9) / (4096*1*270.83) */ |
248 /* = 0.000195748 */ | 250 /* = 0.000195748 */ |
249 /* C_Psi_sta_inv = 1/C_Psi_sta = 5108 */ | 251 /* C_Psi_sta_inv = 1/C_Psi_sta = 5108 */ |
250 /************************************************************************/ | 252 /************************************************************************/ |
251 | 253 |
254 #ifdef CONFIG_TARGET_PIRELLI | |
255 | |
256 /* matching Pirelli's fw as read out via rftr 9 */ | |
257 #define C_Psi_sta_inv 6974L // (1/C_Psi_sta) | |
258 #define C_Psi_st 8L // C_Psi_sta * 0.8 F0.16 | |
259 #define C_Psi_st_32 492713L // F0.32 | |
260 #define C_Psi_st_inv 8717L // (1/C_Psi_st) | |
261 | |
262 #else | |
263 | |
264 /* original TCS211 values */ | |
252 #define C_Psi_sta_inv 5419L // (1/C_Psi_sta) | 265 #define C_Psi_sta_inv 5419L // (1/C_Psi_sta) |
253 #define C_Psi_st 10L // C_Psi_sta * 0.8 F0.16 | 266 #define C_Psi_st 10L // C_Psi_sta * 0.8 F0.16 |
254 #define C_Psi_st_32 634112L // F0.32 | 267 #define C_Psi_st_32 634112L // F0.32 |
255 #define C_Psi_st_inv 6773L // (1/C_Psi_st) | 268 #define C_Psi_st_inv 6773L // (1/C_Psi_st) |
256 | 269 |
270 #endif | |
271 | |
257 #if (VCXO_ALGO == 1) | 272 #if (VCXO_ALGO == 1) |
258 // Linearity parameters | 273 // Linearity parameters |
274 | |
275 #ifdef CONFIG_TARGET_COMPAL | |
276 /* matching Compal's fw as read out via rftr 9 */ | |
277 #define C_AFC_DAC_CENTER ((1000)*8) | |
278 #define C_AFC_DAC_MIN ((-500)*8) | |
279 #define C_AFC_DAC_MAX ((2500)*8) | |
280 #else | |
281 /* original TCS211 values */ | |
259 #define C_AFC_DAC_CENTER ((111)*8) | 282 #define C_AFC_DAC_CENTER ((111)*8) |
260 #define C_AFC_DAC_MIN ((-1196)*8) | 283 #define C_AFC_DAC_MIN ((-1196)*8) |
261 #define C_AFC_DAC_MAX ((1419)*8) | 284 #define C_AFC_DAC_MAX ((1419)*8) |
285 #endif | |
262 | 286 |
263 #define C_AFC_SNR_THR 2560 // 1/0.4 * 2**10 | 287 #define C_AFC_SNR_THR 2560 // 1/0.4 * 2**10 |
264 #endif | 288 #endif |
265 | 289 |
266 typedef struct | 290 typedef struct |