From 8055ac0d4f10c8c13709d49fedcc66615e472a79 Mon Sep 17 00:00:00 2001 From: michael-west Date: Fri, 8 Aug 2014 17:40:54 -0700 Subject: - Fixes for channel alignment - Added analog delay for radio clock - Added analog delay for DAC reference clocks - Removed resetting of clock control - Removed setting of reference clock and PPS to external sources during initialization - Fixes for set_time_unknown_pps - Removed wait for PPS edge after setting time from GPSDO - Changed set_time_unknonw_pps to time out based on system time rather than device VITA time --- host/lib/usrp/multi_usrp.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp/multi_usrp.cpp') diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 71b1f8995..c13d3efba 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -394,17 +394,19 @@ public: void set_time_unknown_pps(const time_spec_t &time_spec){ UHD_MSG(status) << " 1) catch time transition at pps edge" << std::endl; - time_spec_t time_start = get_time_now(); + boost::system_time end_time = boost::get_system_time() + boost::posix_time::milliseconds(1100); time_spec_t time_start_last_pps = get_time_last_pps(); - while(true){ - if (get_time_last_pps() != time_start_last_pps) break; - if ((get_time_now() - time_start) > time_spec_t(1.1)){ + while (time_start_last_pps == get_time_last_pps()) + { + if (boost::get_system_time() > end_time) + { throw uhd::runtime_error( "Board 0 may not be getting a PPS signal!\n" "No PPS detected within the time interval.\n" "See the application notes for your device.\n" ); } + boost::this_thread::sleep(boost::posix_time::milliseconds(1)); } UHD_MSG(status) << " 2) set times next pps (synchronously)" << std::endl; -- cgit v1.2.3