diff options
Diffstat (limited to 'host/lib/usrp/b200/b200_impl.cpp')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 6de161e87..6b0960a62 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -518,8 +518,12 @@ b200_impl::b200_impl( //////////////////////////////////////////////////////////////////// // Create the GPSDO control //////////////////////////////////////////////////////////////////// - if (_gpsdo_capable) { - if ((_local_ctrl->peek32(RB32_CORE_STATUS) & 0xff) != B200_GPSDO_ST_NONE) { + if (_gpsdo_capable) + { + + // Do not check this flag, I don't see why it is needed + //if ((_local_ctrl->peek32(RB32_CORE_STATUS) & 0xff) != B200_GPSDO_ST_NONE) + { UHD_LOGGER_INFO("B200") << "Detecting internal GPSDO.... " << std::flush; try { _gps = gps_ctrl::make(_async_task_data->gpsdo_uart); @@ -838,6 +842,14 @@ b200_impl::b200_impl( _tree->access<std::string>(mb_path / "clock_source/value").set("internal"); _tree->access<std::string>(mb_path / "time_source/value").set("internal"); + //GPS installed: use external ref, time, and init time spec + if (_gps and _gps->gps_detected()) { + const int freq = _gps->gps_refclock_frequency(); + if (not _adf4001_iface->set_refclk_frequency(freq)) { + throw uhd::value_error("Could not set refclk frequency"); + } + } + // Set the DSP chains to some safe value for (size_t i = 0; i < _radio_perifs.size(); i++) { _radio_perifs[i].ddc->set_host_rate( |