aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b200
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2014-07-31 15:25:22 +0200
committerMartin Braun <martin.braun@ettus.com>2014-07-31 15:25:22 +0200
commit4999b5df50d4e859bc3c95c2cbe0efc58df5c42a (patch)
treecc80a46c215a2af8285a3b6353417c1135adbbcb /host/lib/usrp/b200
parentcc6414ebcfa637cac5a66872c20848c30f2ee987 (diff)
parentfb47c829c2006ff42d5fc5e167060c801c463325 (diff)
downloaduhd-4999b5df50d4e859bc3c95c2cbe0efc58df5c42a.tar.gz
uhd-4999b5df50d4e859bc3c95c2cbe0efc58df5c42a.tar.bz2
uhd-4999b5df50d4e859bc3c95c2cbe0efc58df5c42a.zip
Merge branch 'maint'
Conflicts: host/utils/usrp_burn_mb_eeprom.cpp
Diffstat (limited to 'host/lib/usrp/b200')
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 245fbf4a9..49ed3f3f9 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -474,6 +474,11 @@ b200_impl::b200_impl(const device_addr_t &device_addr)
UHD_MSG(status) << "Initializing time to the internal GPSDO" << std::endl;
const time_t tp = time_t(_gps->get_sensor("gps_time").to_int()+1);
_tree->access<time_spec_t>(mb_path / "time" / "pps").set(time_spec_t(tp));
+
+ //wait for next PPS edge (timeout after 1 second)
+ time_spec_t pps_time = _tree->access<time_spec_t>(mb_path / "time" / "pps").get();
+ for (size_t i = 0; i < 10 && _tree->access<time_spec_t>(mb_path / "time" / "pps").get() == pps_time; i++)
+ boost::this_thread::sleep(boost::posix_time::milliseconds(100));
} else {
//init to internal clock and time source
_tree->access<std::string>(mb_path / "clock_source/value").set("internal");