changeset 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 a90812ea82c9
children cbd92db6b34e
files src/cs/layer1/cust0/l1_rf12.h
diffstat 1 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/layer1/cust0/l1_rf12.h	Wed Nov 15 07:22:06 2017 +0000
+++ b/src/cs/layer1/cust0/l1_rf12.h	Thu Nov 16 05:43:03 2017 +0000
@@ -9,6 +9,8 @@
 #ifndef __L1_RF_H__
 #define __L1_RF_H__
 
+#include "fc-target.cfg"
+
 #define RF_RITA_10 0x2030 // Check with TIDK
 
 //#define RF_HW_BAND_EGSM
@@ -249,16 +251,38 @@
 /* C_Psi_sta_inv = 1/C_Psi_sta = 5108                                   */
 /************************************************************************/
 
+#ifdef CONFIG_TARGET_PIRELLI
+
+/* matching Pirelli's fw as read out via rftr 9 */
+#define  C_Psi_sta_inv    6974L    // (1/C_Psi_sta)
+#define  C_Psi_st         8L       // C_Psi_sta * 0.8 F0.16
+#define  C_Psi_st_32      492713L  // F0.32
+#define  C_Psi_st_inv     8717L    // (1/C_Psi_st)
+
+#else
+
+/* original TCS211 values */
 #define  C_Psi_sta_inv    5419L    // (1/C_Psi_sta)
 #define  C_Psi_st         10L      // C_Psi_sta * 0.8 F0.16
 #define  C_Psi_st_32      634112L  // F0.32
 #define  C_Psi_st_inv     6773L    // (1/C_Psi_st)
 
+#endif
+
 #if (VCXO_ALGO == 1)
 // Linearity parameters
+
+#ifdef CONFIG_TARGET_COMPAL
+  /* matching Compal's fw as read out via rftr 9 */
+  #define  C_AFC_DAC_CENTER     ((1000)*8)
+  #define  C_AFC_DAC_MIN        ((-500)*8)
+  #define  C_AFC_DAC_MAX        ((2500)*8)
+#else
+  /* original TCS211 values */
   #define  C_AFC_DAC_CENTER     ((111)*8)
   #define  C_AFC_DAC_MIN        ((-1196)*8)
   #define  C_AFC_DAC_MAX        ((1419)*8)
+#endif
 
   #define  C_AFC_SNR_THR        2560     //  1/0.4    * 2**10
 #endif