diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-07-15 11:43:17 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-07-15 11:43:17 +0200 |
commit | 7149658fbbee12114429183f8015effd5f59a5f6 (patch) | |
tree | 62e75341dc133dad46950be665fa603886d0415f /host/lib/usrp/b200/b200_impl.cpp | |
parent | 416ac19e94d684111517df7f371810fbc469603c (diff) | |
download | uhd-7149658fbbee12114429183f8015effd5f59a5f6.tar.gz uhd-7149658fbbee12114429183f8015effd5f59a5f6.tar.bz2 uhd-7149658fbbee12114429183f8015effd5f59a5f6.zip |
Autoconfigure refclk frequency if LEA-M8F detectedlea-m8f-003_009_004
This should make this branch compatible with both Ettus GPSDO
using 10MHz refclk and the LEA-M8F using 30.72MHz
Diffstat (limited to 'host/lib/usrp/b200/b200_impl.cpp')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 4b17b27f0..a4d43f6b9 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -722,6 +722,13 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s //GPS installed: use external ref, time, and init time spec if (_gps and _gps->gps_detected()) { + if (_gps->gps_detected_lea_m8f()) { + // Switch REFCLK Frequency to 30.72MHz before setting clock_source to gpsdo + if (not _adf4001_iface->set_refclk_frequency(30720)) { + throw uhd::value_error("Could not set refclk frequency to 30.72MHz for LEA-M8F!"); + } + } + UHD_MSG(status) << "Setting references to the internal GPSDO" << std::endl; _tree->access<std::string>(mb_path / "time_source" / "value").set("gpsdo"); _tree->access<std::string>(mb_path / "clock_source" / "value").set("gpsdo"); |