fix procedure after T300 expiry

This commit is contained in:
francescomani
2024-03-19 09:55:05 +01:00
parent 122a5ce9b8
commit 1fa6be2a3d
7 changed files with 22 additions and 24 deletions
+9 -11
View File
@@ -105,8 +105,7 @@ int nr_pbch_detection(const UE_nr_rxtx_proc_t *proc,
int pbch_initial_symbol,
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
{
NR_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
int ret =-1;
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
NR_UE_SSB *best_ssb = NULL;
NR_UE_SSB *current_ssb;
@@ -138,8 +137,9 @@ int nr_pbch_detection(const UE_nr_rxtx_proc_t *proc,
}
}
NR_UE_SSB *temp_ptr=best_ssb;
while (ret!=0 && temp_ptr != NULL) {
NR_UE_SSB *temp_ptr = best_ssb;
int ret = -1;
while (ret != 0 && temp_ptr != NULL) {
start_meas(&ue->dlsch_channel_estimation_stats);
// computing channel estimation for selected best ssb
@@ -165,14 +165,10 @@ int nr_pbch_detection(const UE_nr_rxtx_proc_t *proc,
free_list(best_ssb);
if (ret == 0)
if (ret == 0) {
frame_parms->nb_antenna_ports_gNB = 1; // pbch_tx_ant;
// set initial transmission mode to 1 or 2 depending on number of detected TX antennas
// frame_parms->mode1_flag = (pbch_tx_ant==1);
// openair_daq_vars.dlsch_transmission_mode = (pbch_tx_ant>1) ? 2 : 1;
LOG_I(PHY, "[UE%d] Initial sync: pbch decoded sucessfully, ssb index %d\n", ue->Mod_id, frame_parms->ssb_index);
LOG_I(PHY, "[UE%d] Initial sync: pbch decoded sucessfully, ssb index %d\n", ue->Mod_id, frame_parms->ssb_index);
}
return ret;
}
@@ -429,6 +425,8 @@ nr_initial_sync_t nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, i
#ifdef DEBUG_INITIAL_SYNCH
LOG_I(PHY, "[UE%d] Initial sync : Estimated power: %d dB\n", ue->Mod_id, ue->measurements.rx_power_avg_dB[0]);
#endif
} else {
LOG_A(PHY, "Initial sync successful\n");
}
// exit_fun("debug exit");
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC, VCD_FUNCTION_OUT);