From 3bc168d7d3333a93e3f4b77a213d4b7ac0bc594f Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 12 Oct 2016 15:37:16 -0700 Subject: x300: Add time sync procedure to device initialization Reviewed-By: Derek Kozel --- host/lib/usrp/x300/x300_impl.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'host') diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index e4f6d6fb8..776fac928 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -986,9 +986,17 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr) mb.radios.at(i)->self_test_adc(); } } + + //////////////////////////////////////////////////////////////////// + // Synchronize times (dboard initialization can desynchronize them) + //////////////////////////////////////////////////////////////////// + if (radio_ids.size() == 2) { + this->sync_times(mb, mb.radios[0]->get_time_now()); + } + } else { UHD_MSG(status) << "No Radio Block found. Assuming radio-less operation." << std::endl; - } + } /* end of radio block(s) initialization */ mb.initialization_done = true; } -- cgit v1.2.3