diff gsm-fw/L1/tpudrv/tpudrv12.c @ 580:df12004ac8ee

tpudrv12.c: l1dmacro_tx_{up,down} done
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 15 Aug 2014 01:05:44 +0000
parents df71726fa4e1
children bbb1e73782e6
line wrap: on
line diff
--- a/gsm-fw/L1/tpudrv/tpudrv12.c	Thu Aug 14 21:00:17 2014 +0000
+++ b/gsm-fw/L1/tpudrv/tpudrv12.c	Fri Aug 15 01:05:44 2014 +0000
@@ -573,8 +573,8 @@
 	TSP_TO_ABB(0xA0);
 	*TP_Ptr++ = TPU_FAT(16);
 	*TP_Ptr++ = TPU_MOVE(TSP_ACT, rf_path[rf_index].tx_up | 0x01);
-
-
+	*TP_Ptr++ = TPU_FAT(21);
+	*TP_Ptr++ = TPU_MOVE(TSP_ACTX, 0x0F);
 }
 
 /*-------------------------------------------*/
@@ -582,84 +582,24 @@
 /*-------------------------------------------*/
 /* Close transmission window for normal burst*/
 /*-------------------------------------------*/
-#if (L1_RF_KBD_FIX == 1)
-void l1dmacro_tx_down (WORD32 t, BOOL tx_flag, UWORD8 adc_active, UWORD8 kbd_config)
-{
-  UWORD8 kbd_tspact_config =0;
-
-  if (kbd_config == KBD_DISABLED)
-		kbd_tspact_config =  KBD_DIS_TSPACT;
-
-
-  if (adc_active == ACTIVE) {
-    // 36qbits = (10qbits for  TPU programming) + (26qbits duration to convert the first ADC channel (= Battery))
-    	if ((t)<(TRF_T8+2-TRF_T9))		//Done to enable RACH Burst Support
-    		{
-    		l1dmacro_adc_read_tx (TRF_T8+10, rf_path[rf_index].tx_up);
-    		}
-	else
-		{
-    l1dmacro_adc_read_tx (t + TRF_T9, rf_path[rf_index].tx_up);
-  }
-  }
-
-
-
-  // t10: disable APC
-  *TP_Ptr++ = TPU_FAT (t + TRF_T10);
-  *TP_Ptr++ = TPU_MOVE(REG_SPI_ACT_L, kbd_tspact_config | LDO_EN | APC_EN | TX_START );
-
-  // t11: disable PA
-  *TP_Ptr++ = TPU_FAT (t + TRF_T11);
-  *TP_Ptr++ = TPU_MOVE(REG_SPI_ACT_U, rf_path[rf_index].tx_down);
-	// disable Tx_Start
-  *TP_Ptr++ = TPU_MOVE(REG_SPI_ACT_L, kbd_tspact_config | LDO_EN | APC_EN );
-
-  // t12: power off Locosto: IDLE SCRIPT
-  *TP_Ptr++ = TPU_FAT (t + TRF_T12);
-  MOVE_REG_TSP_TO_RF(START_SCRIPT(DRP_IDLE), ((UWORD16)( ((UWORD32)(&drp_regs->SCRIPT_STARTL))&0xFFFF)));
-
-  // t13: Switch off APC
-  *TP_Ptr++ = TPU_FAT (t + TRF_T13);
-  *TP_Ptr++ = TPU_MOVE(REG_SPI_ACT_L, 0);
-
-  }
-#endif /*(L1_RF_KBD_FIX == 1)*/
-
-
-
-#if (L1_RF_KBD_FIX == 0)
+/* Rita version differs from LoCosto,        */
+/* reconstructing from disassembly.          */
+/*-------------------------------------------*/
 void l1dmacro_tx_down (WORD32 t, BOOL tx_flag, UWORD8 adc_active)
 {
-
-  if (adc_active == ACTIVE) {
-    // 36qbits = (10qbits for  TPU programming) + (26qbits duration to convert the first ADC channel (= Battery))
-    l1dmacro_adc_read_tx (t + TRF_T9, rf_path[rf_index].tx_up);
-  }
-
-   // t10: disable APC
-  *TP_Ptr++ = TPU_FAT (t + TRF_T10);
-  *TP_Ptr++ = TPU_MOVE(REG_SPI_ACT_L, kbd_tspact_config | LDO_EN | APC_EN | TX_START );
-
-  // t11: disable PA
-  *TP_Ptr++ = TPU_FAT (t + TRF_T11);
-  *TP_Ptr++ = TPU_MOVE(REG_SPI_ACT_U, rf_path[rf_index].tx_down);
-	// disable Tx_Start
-  *TP_Ptr++ = TPU_MOVE(REG_SPI_ACT_L, kbd_tspact_config | LDO_EN | APC_EN );
-
-  // t12: power off Locosto: IDLE SCRIPT
-  *TP_Ptr++ = TPU_FAT (t + TRF_T12);
-  MOVE_REG_TSP_TO_RF(START_SCRIPT(DRP_IDLE), (UWORD16)(&drp_regs->SCRIPT_STARTL));
-
-  // t13: Switch off APC
-  *TP_Ptr++ = TPU_FAT (t + TRF_T13);
-  *TP_Ptr++ = TPU_MOVE(REG_SPI_ACT_L, 0);
-
+	if (adc_active == ACTIVE)
+		l1dmacro_adc_read_tx(t - 44);
+	*TP_Ptr++ = TPU_FAT(t - 4);
+	TSP_TO_ABB(0x80);
+	*TP_Ptr++ = TPU_FAT(t + 22);
+	*TP_Ptr++ = TPU_MOVE(TSP_ACTX, 0x00);
+	*TP_Ptr++ = TPU_MOVE(TSP_ACT, rf_path[rf_index].tx_down | 0x01);
+	*TP_Ptr++ = TPU_FAT(t + 25);
+	TSP_TO_RF(0x003A);
+	*TP_Ptr++ = TPU_FAT(t + 31);
+	TSP_TO_ABB(0x00);
 }
 
-
-#endif/*(L1_RF_KBD_FIX == 0)*/
-
 /*
  * l1dmacro_rx_nb
  *