From 5b6b1708225fd0dbbf492cf7c2e4ccc297a286db Mon Sep 17 00:00:00 2001 From: ismagom Date: Mon, 1 Feb 2016 11:03:23 +0100 Subject: [PATCH 1/2] Reduced sample rates for 10 and 20 Mhz --- srslte/lib/common/src/phy_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srslte/lib/common/src/phy_common.c b/srslte/lib/common/src/phy_common.c index 4987db530..fb988e01c 100644 --- a/srslte/lib/common/src/phy_common.c +++ b/srslte/lib/common/src/phy_common.c @@ -231,11 +231,11 @@ int srslte_symbol_sz(uint32_t nof_prb) { } else if (nof_prb<=25) { return 384; } else if (nof_prb<=50) { - return 768; + return 640; } else if (nof_prb<=75) { return 1024; } else if (nof_prb<=100) { - return 1536; + return 1280; } else { return SRSLTE_ERROR; } @@ -254,11 +254,11 @@ int srslte_nof_prb(uint32_t symbol_sz) return 15; case 384: return 25; - case 768: + case 640: return 50; case 1024: return 75; - case 1536: + case 1280: return 100; } } else { From 2a3eef08fb4a96f193ddc9a830ec3afa84c42fdb Mon Sep 17 00:00:00 2001 From: ismagom Date: Mon, 1 Feb 2016 11:06:03 +0100 Subject: [PATCH 2/2] Added timeout to blocking recv/send uhd functions to avoid --- srslte/lib/rf/src/rf_uhd_imp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/srslte/lib/rf/src/rf_uhd_imp.c b/srslte/lib/rf/src/rf_uhd_imp.c index 639190211..b66babcf0 100644 --- a/srslte/lib/rf/src/rf_uhd_imp.c +++ b/srslte/lib/rf/src/rf_uhd_imp.c @@ -431,6 +431,7 @@ int rf_uhd_recv_with_time(void *h, rf_uhd_handler_t *handler = (rf_uhd_handler_t*) h; size_t rxd_samples; uhd_rx_metadata_handle *md = &handler->rx_md_first; + int trials = 0; if (blocking) { int n = 0; cf_t *data_c = (cf_t*) data; @@ -451,7 +452,7 @@ int rf_uhd_recv_with_time(void *h, } md = &handler->rx_md; n += rxd_samples; - } while (n < nsamples); + } while (n < nsamples && trials < 100); } else { void **buffs_ptr = (void**) &data; return uhd_rx_streamer_recv(handler->rx_stream, buffs_ptr, @@ -479,6 +480,7 @@ int rf_uhd_send_timed(void *h, if (has_time_spec) { uhd_tx_metadata_set_time_spec(&handler->tx_md, secs, frac_secs); } + int trials = 0; if (blocking) { int n = 0; cf_t *data_c = (cf_t*) data; @@ -511,7 +513,7 @@ int rf_uhd_send_timed(void *h, // Increase time spec uhd_tx_metadata_add_time_spec(&handler->tx_md, txd_samples/handler->tx_rate); n += txd_samples; - } while (n < nsamples); + } while (n < nsamples && trials < 100); return nsamples; } else { const void **buffs_ptr = (const void**) &data;