aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-03-03 23:37:30 +0700
committerPiotr Krysik <ptrkrysik@gmail.com>2018-09-13 15:35:44 +0200
commit45457e959df2385aee57d578cd011be4e97caf23 (patch)
tree5171caaf2f5f5a932d5a385a5c8fc391e8683be6
parent07a2abb635db6ffabcb4f44932f38bb321e631f8 (diff)
trx/radio_if.py: reset UHD device time at startup
Some UHD devices, such as UmTRX, require one to manually reset the hardware clock, otherwise the burst transmission doesn't work. Change-Id: Idddc1387199bd22342ec5af25c8635e73352e315
-rw-r--r--python/trx/radio_if.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/trx/radio_if.py b/python/trx/radio_if.py
index 355312b..119b237 100644
--- a/python/trx/radio_if.py
+++ b/python/trx/radio_if.py
@@ -257,6 +257,12 @@ class radio_if(gr.top_block):
(self.dict_toggle_sign, 'dict_out'),
(self.msg_to_tag_sink, 'msg'))
+
+ # Some UHD devices (such as UmTRX) do start the clock
+ # not from 0, so it's required to reset it manually.
+ # Resetting UHD source will also affect the sink.
+ self.phy_src.set_time_now(uhd.time_spec(0.0))
+
def shutdown(self):
print("[i] Shutdown Radio interface")
self.stop()