aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b200
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2014-08-05 17:07:46 -0700
committerAshish Chaudhari <ashish@ettus.com>2014-08-05 17:07:46 -0700
commit64c1d64901860c55acd1cfd21508e6b89a35a6ed (patch)
tree109de2c044e99b0c720800fdfec04194f62c90d1 /host/lib/usrp/b200
parentdb6f3a2d7aabdd0eaa1021ac174edd3cbb77be55 (diff)
parent605b470a873c600dec9c106f5b09b70a77960470 (diff)
downloaduhd-64c1d64901860c55acd1cfd21508e6b89a35a6ed.tar.gz
uhd-64c1d64901860c55acd1cfd21508e6b89a35a6ed.tar.bz2
uhd-64c1d64901860c55acd1cfd21508e6b89a35a6ed.zip
Merge branch 'master' into ashish/cat_refactor_master
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 7c85176ef..393da2d04 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -475,6 +475,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");