aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2014-12-29 23:15:09 -0800
committerMartin Braun <martin.braun@ettus.com>2015-01-12 14:19:41 +0100
commit0b9b070515eaae6a631095f2d08d664e07ee4140 (patch)
treeee0c845bf1ab41eb70da72e724733c98e89a4246
parentf3556c72bb8125b2ba58d4691e1b243ce99d8ab9 (diff)
downloaduhd-0b9b070515eaae6a631095f2d08d664e07ee4140.tar.gz
uhd-0b9b070515eaae6a631095f2d08d664e07ee4140.tar.bz2
uhd-0b9b070515eaae6a631095f2d08d664e07ee4140.zip
x300: Fix for BUG #655: X300: Device Time Not Getting Set from GPSDO
- Moved setting of tick rate before setting of PPS time
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index a879ae02d..eab5cfef2 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -755,6 +755,12 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
_tree->create<bool>(mb_path / "clock_source" / "output")
.subscribe(boost::bind(&x300_clock_ctrl::set_ref_out, mb.clock, _1));
+ //initialize tick rate (must be done before setting time)
+ _tree->access<double>(mb_path / "tick_rate")
+ .subscribe(boost::bind(&x300_impl::set_tick_rate, this, boost::ref(mb), _1))
+ .subscribe(boost::bind(&x300_impl::update_tick_rate, this, boost::ref(mb), _1))
+ .set(mb.clock->get_master_clock_rate());
+
////////////////////////////////////////////////////////////////////
// initialize clock and time sources
////////////////////////////////////////////////////////////////////
@@ -790,14 +796,6 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
.publish(boost::bind(&x300_impl::get_ref_locked, this, mb.zpu_ctrl));
////////////////////////////////////////////////////////////////////
- // create clock properties
- ////////////////////////////////////////////////////////////////////
- _tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&x300_impl::set_tick_rate, this, boost::ref(mb), _1))
- .subscribe(boost::bind(&x300_impl::update_tick_rate, this, boost::ref(mb), _1))
- .set(mb.clock->get_master_clock_rate());
-
- ////////////////////////////////////////////////////////////////////
// do some post-init tasks
////////////////////////////////////////////////////////////////////
subdev_spec_t rx_fe_spec, tx_fe_spec;