aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/e300/e300_impl.cpp
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2015-10-15 13:44:00 -0700
committerMartin Braun <martin.braun@ettus.com>2015-12-10 14:21:49 -0800
commitb9b83502771e5caa60fb336441fb0d5ed3fe9f1a (patch)
tree0e0e6a4b5d2fa9224007d5862fab5b95856089df /host/lib/usrp/e300/e300_impl.cpp
parentc1e6da087946b522018996267441b8555791dabd (diff)
downloaduhd-b9b83502771e5caa60fb336441fb0d5ed3fe9f1a.tar.gz
uhd-b9b83502771e5caa60fb336441fb0d5ed3fe9f1a.tar.bz2
uhd-b9b83502771e5caa60fb336441fb0d5ed3fe9f1a.zip
B200/E300: Set time sync on clock rate change to current time of first radio
Diffstat (limited to 'host/lib/usrp/e300/e300_impl.cpp')
-rw-r--r--host/lib/usrp/e300/e300_impl.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/host/lib/usrp/e300/e300_impl.cpp b/host/lib/usrp/e300/e300_impl.cpp
index 5cc274bbb..0003dddb0 100644
--- a/host/lib/usrp/e300/e300_impl.cpp
+++ b/host/lib/usrp/e300/e300_impl.cpp
@@ -528,11 +528,11 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
////////////////////////////////////////////////////////////////////
_tree->create<time_spec_t>(mb_path / "time" / "now")
.publish(boost::bind(&time_core_3000::get_time_now, _radio_perifs[0].time64))
- .subscribe(boost::bind(&e300_impl::_sync_times, this, _1))
+ .subscribe(boost::bind(&e300_impl::_set_time, this, _1))
.set(0.0);
//re-sync the times when the tick rate changes
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&e300_impl::_sync_times, this, _radio_perifs[0].time64->get_time_now()));
+ .subscribe(boost::bind(&e300_impl::_sync_times, this));
_tree->create<time_spec_t>(mb_path / "time" / "pps")
.publish(boost::bind(&time_core_3000::get_time_last_pps, _radio_perifs[0].time64))
.subscribe(boost::bind(&time_core_3000::set_time_next_pps, _radio_perifs[0].time64, _1))
@@ -829,7 +829,7 @@ void e300_impl::_update_time_source(const std::string &source)
_update_gpio_state();
}
-void e300_impl::_sync_times(const uhd::time_spec_t& t)
+void e300_impl::_set_time(const uhd::time_spec_t& t)
{
BOOST_FOREACH(radio_perifs_t &perif, _radio_perifs)
perif.time64->set_time_sync(t);
@@ -839,6 +839,11 @@ void e300_impl::_sync_times(const uhd::time_spec_t& t)
_update_gpio_state();
}
+void e300_impl::_sync_times()
+{
+ _set_time(_radio_perifs[0].time64->get_time_now());
+}
+
size_t e300_impl::_get_axi_dma_channel(
boost::uint8_t destination,
boost::uint8_t prefix)