From 826279754529f76a0eb617cf02ade75a4145904f Mon Sep 17 00:00:00 2001 From: Derek Kozel Date: Tue, 10 Jul 2018 09:25:54 +0000 Subject: uhd: Warn when tuning with auto DSP frequency and an external LO In LO sharing cases this can result in frequency errors between channels. --- host/lib/usrp/multi_usrp.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index cdce43055..48da5023b 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -906,6 +906,25 @@ public: } tune_result_t set_rx_freq(const tune_request_t &tune_request, size_t chan){ + + // If any mixer is driven by an external LO the daughterboard assumes that no CORDIC correction is + // necessary. Since the LO might be sourced from another daughterboard which would normally apply a + // cordic correction a manual DSP tune policy should be used to ensure identical configurations across + // daughterboards. + if (tune_request.dsp_freq_policy == tune_request.POLICY_AUTO and + tune_request.rf_freq_policy == tune_request.POLICY_AUTO) + { + for (size_t c = 0; c < get_rx_num_channels(); c++) { + if (get_rx_lo_source(ALL_LOS, c) == "external") { + UHD_LOGGER_WARNING("MULTI_USRP") + << "At least one channel is using an external LO." + << "Using a manual DSP frequency policy is recommended to ensure " + << "the same frequency shift on all channels."; + break; + } + } + } + tune_result_t result = tune_xx_subdev_and_dsp(RX_SIGN, _tree->subtree(rx_dsp_root(chan)), _tree->subtree(rx_rf_fe_root(chan)), -- cgit v1.2.3