FreeCalypso > hg > tcs211-l1-reconst
changeset 90:1bcd93a7c518
l1_ctl.c: l1ctl_pagc() reconstructed
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Thu, 07 Apr 2016 03:16:52 +0000 |
parents | 2a56451df569 |
children | 51f3b9364365 |
files | chipsetsw/layer1/cfile/l1_ctl.c |
diffstat | 1 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_ctl.c Thu Apr 07 03:00:32 2016 +0000 +++ b/chipsetsw/layer1/cfile/l1_ctl.c Thu Apr 07 03:16:52 2016 +0000 @@ -2405,12 +2405,14 @@ WORD32 current_IL, current_calibrated_IL; UWORD8 i; WORD32 lna_value; - UWORD16 arfcn; + #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) + UWORD16 arfcn; + #endif UWORD8 lna_off; UWORD16 dco_algo_ctl_pw_temp = 0; UWORD8 if_ctl = 0; #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) - UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; + UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; #endif delta1_freq = l1ctl_encode_delta1(radio_freq); @@ -2433,11 +2435,13 @@ // in the associated CTL task to build // the agc used in this CTL. -#if (L1_FF_MULTIBAND == 0) +#if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) +#if (L1_FF_MULTIBAND == 0) arfcn = Convert_l1_radio_freq(radio_freq); #else - arfcn=radio_freq; -#endif + arfcn = radio_freq; +#endif +#endif #if(RF_FAM == 61) #if (CODE_VERSION != SIMULATION) @@ -2458,7 +2462,7 @@ #endif if (0==pm) // Check and filter illegal pm value by using last valid IL - current_IL = IL_info_ptr->input_level; + current_IL = IL_info_ptr->input_level - lna_value; else current_IL = -(pm - (last_known_agc - delta_drp_gain) + lna_value - l1ctl_get_g_magic(radio_freq)); @@ -2479,7 +2483,8 @@ &(IL_info_ptr->lna_off), radio_freq ); - IL_info_ptr->input_level = IL_max; + IL_info_ptr->input_level = IL_max + l1ctl_get_lna_att(radio_freq) * + IL_info_ptr->lna_off; #if L2_L3_SIMUL #if (DEBUG_TRACE==BUFFER_TRACE_PAGC)