aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-03-03 23:37:30 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-08-10 16:38:53 +0700
commit0017a35aabeb09f9622e8fa9d09c9f3505946754 (patch)
tree24c9e4fe3eea2465feaaef3eca26d09a76fe399f
parentcae78211a601c92ad7d0492a0dcf7b5934cc26f2 (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()