From 5a61f9944c93bc33157361330dbdc5165427330c Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Thu, 8 Mar 2018 09:58:13 +0100
Subject: [PATCH] cleanup - remove unnecessary calls to get_cpu_freq_GHz

The one in lte-enb.c disrupts the realtime. Using a B200mini with
20MHz bandwidth leads to the UE unable to connect for it seesms like
the UL and DL are not properly time synched because of this sleep
of one second that happens after the USRP streaming has started.
We see some random access attempts but the decoded preamble is
wrong.

This may be dependant on the setup. I had sporadic errors with
a B210, where sometimes the UE could connect and sometimes not.
---
 targets/RT/USER/lte-enb.c       | 7 -------
 targets/RT/USER/lte-softmodem.c | 6 ++----
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index 01a2c68bf3..e1c5d10de5 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -163,13 +163,6 @@ extern void add_subframe(uint16_t *frameP, uint16_t *subframeP, int offset);
 
 
 static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_name) {
-
-  static double cpu_freq_GHz = 0.0;
-
-  if (cpu_freq_GHz == 0.0)
-    cpu_freq_GHz = get_cpu_freq_GHz();
-
-
   start_meas(&softmodem_stats_rxtx_sf);
 
   // *******************************************************************
diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c
index f6789086b4..0564049c70 100644
--- a/targets/RT/USER/lte-softmodem.c
+++ b/targets/RT/USER/lte-softmodem.c
@@ -1249,10 +1249,8 @@ int main( int argc, char **argv )
 
   printf("Runtime table\n");
   fill_modeled_runtime_table(runtime_phy_rx,runtime_phy_tx);
-  cpuf=get_cpu_freq_GHz();
-  
-  
-  
+
+
 #ifndef DEADLINE_SCHEDULER
   
   printf("NO deadline scheduler\n");
-- 
GitLab