From b037fb8e510971b9703870d2d77f6fb3240ee22b Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 12 Apr 2019 17:48:49 +0200 Subject: [PATCH] Added minimal UE synch tweak and fix --- srsue/hdr/phy/sync.h | 4 ++-- srsue/src/phy/sync.cc | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/srsue/hdr/phy/sync.h b/srsue/hdr/phy/sync.h index 23fb6291b..71d7f7443 100644 --- a/srsue/hdr/phy/sync.h +++ b/srsue/hdr/phy/sync.h @@ -297,8 +297,8 @@ private: uint32_t out_of_sync_cnt; uint32_t in_sync_cnt; - const static uint32_t NOF_OUT_OF_SYNC_SF = 200; - const static uint32_t NOF_IN_SYNC_SF = 100; + const static uint32_t NOF_OUT_OF_SYNC_SF = 20; + const static uint32_t NOF_IN_SYNC_SF = 10; // State machine for SYNC thread class sync_state { diff --git a/srsue/src/phy/sync.cc b/srsue/src/phy/sync.cc index a3654701a..d528a2aa9 100644 --- a/srsue/src/phy/sync.cc +++ b/srsue/src/phy/sync.cc @@ -393,6 +393,8 @@ void sync::run_thread() // If not camping, clear SFN sync if (!phy_state.is_camping()) { force_camping_sfn_sync = false; + } else { + out_of_sync(); } if (log_phy_lib_h) { @@ -673,7 +675,7 @@ void sync::in_sync() // Out of sync called by worker or sync every 1 or 5 ms void sync::out_of_sync() { - // Send RRC out-of-sync signal after 200 ms consecutive subframes + // Send RRC out-of-sync signal after NOF_OUT_OF_SYNC_SF consecutive subframes Info("Out-of-sync %d/%d\n", out_of_sync_cnt, NOF_OUT_OF_SYNC_SF); out_of_sync_cnt++; if (out_of_sync_cnt == NOF_OUT_OF_SYNC_SF) {