diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2015-01-22 14:15:34 -0800 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2015-01-22 14:15:34 -0800 |
commit | 1f44f06abad589d2244eecfcbca1618b4fcb3ffd (patch) | |
tree | ace8223ec045ab7d53a383d5e4805aa5deb00a80 /host/lib/usrp/e300/e300_impl.cpp | |
parent | 9c3cdb6ee831f164e5a8734a71ad3cd5543719ac (diff) | |
download | uhd-1f44f06abad589d2244eecfcbca1618b4fcb3ffd.tar.gz uhd-1f44f06abad589d2244eecfcbca1618b4fcb3ffd.tar.bz2 uhd-1f44f06abad589d2244eecfcbca1618b4fcb3ffd.zip |
e300: UHD support for refclk disciplining using PPS.
- Only supported value for clk_source is internal
- time_source automatically changes the disciplining pulse source
- Added ref_locked sensor
Diffstat (limited to 'host/lib/usrp/e300/e300_impl.cpp')
-rw-r--r-- | host/lib/usrp/e300/e300_impl.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/host/lib/usrp/e300/e300_impl.cpp b/host/lib/usrp/e300/e300_impl.cpp index d04794947..c74ce9412 100644 --- a/host/lib/usrp/e300/e300_impl.cpp +++ b/host/lib/usrp/e300/e300_impl.cpp @@ -381,7 +381,7 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr) } catch (std::exception &e) { UHD_MSG(error) << "An error occured making GPSDO control: " << e.what() << std::endl; } - _sensor_manager = e300_sensor_manager::make_local(_gps); + _sensor_manager = e300_sensor_manager::make_local(_gps, _global_regs); } UHD_MSG(status) << (_sensor_manager->get_gps_found() ? "found" : "not found") << std::endl; @@ -493,14 +493,15 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr) .subscribe(boost::bind(&time_core_3000::set_time_next_pps, _radio_perifs[1].time64, _1)); //setup time source props _tree->create<std::string>(mb_path / "time_source" / "value") - .subscribe(boost::bind(&e300_impl::_update_time_source, this, _1)); - static const std::vector<std::string> time_sources = boost::assign::list_of("none")("external")("gpsdo"); + .subscribe(boost::bind(&e300_impl::_update_time_source, this, _1)) + .set("internal"); + static const std::vector<std::string> time_sources = boost::assign::list_of("none")("internal")("external")("gpsdo"); _tree->create<std::vector<std::string> >(mb_path / "time_source" / "options").set(time_sources); //setup reference source props _tree->create<std::string>(mb_path / "clock_source" / "value") - .subscribe(boost::bind(&e300_impl::_update_clock_source, this, _1)); - static const std::vector<std::string> clock_sources = boost::assign::list_of("internal"); - // not implemented ("external")("gpsdo"); + .subscribe(boost::bind(&e300_impl::_update_clock_source, this, _1)) + .set("internal"); + static const std::vector<std::string> clock_sources = boost::assign::list_of("internal"); //external,gpsdo not supported _tree->create<std::vector<std::string> >(mb_path / "clock_source" / "options").set(clock_sources); //////////////////////////////////////////////////////////////////// @@ -895,14 +896,20 @@ e300_impl::both_xports_t e300_impl::_make_transport( return xports; } -void e300_impl::_update_clock_source(const std::string &) +void e300_impl::_update_clock_source(const std::string &source) { + if (source != "internal") { + throw uhd::value_error(boost::str( + boost::format("Clock source option not supported: %s. The only value supported is \"internal\". " \ + "To discipline the internal oscillator, set the appropriate time source.") % source + )); + } } void e300_impl::_update_antenna_sel(const size_t &which, const std::string &ant) { if (ant != "TX/RX" and ant != "RX2") - throw uhd::value_error("e300: unknown RX antenna option: " + ant); + throw uhd::value_error("Unknown RX antenna option: " + ant); _radio_perifs[which].ant_rx2 = (ant == "RX2"); this->_update_atrs(); } |