From 0b9b070515eaae6a631095f2d08d664e07ee4140 Mon Sep 17 00:00:00 2001 From: michael-west Date: Mon, 29 Dec 2014 23:15:09 -0800 Subject: x300: Fix for BUG #655: X300: Device Time Not Getting Set from GPSDO - Moved setting of tick rate before setting of PPS time --- host/lib/usrp/x300/x300_impl.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'host/lib/usrp') 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(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(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 //////////////////////////////////////////////////////////////////// @@ -789,14 +795,6 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr) _tree->create(mb_path / "sensors" / "ref_locked") .publish(boost::bind(&x300_impl::get_ref_locked, this, mb.zpu_ctrl)); - //////////////////////////////////////////////////////////////////// - // create clock properties - //////////////////////////////////////////////////////////////////// - _tree->access(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 //////////////////////////////////////////////////////////////////// -- cgit v1.2.3