From 7cdd1c2ba49d70262b24aec3297b5f7238392c9b Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Mon, 17 Feb 2020 15:07:45 +0100 Subject: [PATCH] Set FIND sampling rate before setting frequency --- srsue/src/phy/sync.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/srsue/src/phy/sync.cc b/srsue/src/phy/sync.cc index 72279710c..2bb725b98 100644 --- a/srsue/src/phy/sync.cc +++ b/srsue/src/phy/sync.cc @@ -213,6 +213,13 @@ phy_interface_rrc_lte::cell_search_ret_t sync::cell_search(phy_interface_rrc_lte // Stop all intra-frequency measurement before changing frequency meas_stop(); + if (srate_mode != SRATE_FIND) { + srate_mode = SRATE_FIND; + radio_h->set_rx_srate(0, 1.92e6); + radio_h->set_tx_srate(0, 1.92e6); + Info("SYNC: Setting Cell Search sampling rate\n"); + } + try { if (current_earfcn != (int)earfcn.at(cellsearch_earfcn_index)) { current_earfcn = (int)earfcn[cellsearch_earfcn_index]; @@ -1049,13 +1056,6 @@ sync::search::ret_code sync::search::run(srslte_cell_t* cell_, std::arraysrate_mode != SRATE_FIND) { - p->srate_mode = SRATE_FIND; - p->radio_h->set_rx_srate(0, 1.92e6); - p->radio_h->set_tx_srate(0, 1.92e6); - Info("SYNC: Setting Cell Search sampling rate\n"); - } - /* Find a cell in the given N_id_2 or go through the 3 of them to find the strongest */ uint32_t max_peak_cell = 0; int ret = SRSLTE_ERROR;