diff options
author | Trung N Tran <trung.tran@ettus.com> | 2017-12-11 19:52:12 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:05:58 -0800 |
commit | ea7cc7f8250cd9bdb41c1f22703d38be91fb6a84 (patch) | |
tree | 5223a5f7f12d2de0612a8ff3e21df2dfb4d3a759 /host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp | |
parent | 9051301033f8a366fe04052c162d0a48495334e2 (diff) | |
download | uhd-ea7cc7f8250cd9bdb41c1f22703d38be91fb6a84.tar.gz uhd-ea7cc7f8250cd9bdb41c1f22703d38be91fb6a84.tar.bz2 uhd-ea7cc7f8250cd9bdb41c1f22703d38be91fb6a84.zip |
mg: external LO need update correct freq
Need to update rf freq to half of ad9371
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp')
-rw-r--r-- | host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp index c7087532d..8fa500872 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp @@ -269,9 +269,20 @@ void magnesium_radio_ctrl_impl::_update_freq( const size_t chan, const uhd::direction_t dir ) { + const std::string ad9371_source = dir == TX_DIRECTION ? + this->get_tx_lo_source(MAGNESIUM_LO1, chan) : + this->get_rx_lo_source(MAGNESIUM_LO1, chan) + ; + + const double ad9371_freq = ad9371_source == "external" ? + _ad9371_freq[dir]/2 : + _ad9371_freq[dir] + ; const double rf_freq = _is_low_band[dir] ? - _ad9371_freq[dir] - _adf4351_freq[dir] : - _ad9371_freq[dir]; + ad9371_freq - _adf4351_freq[dir] : + ad9371_freq + ; + UHD_LOG_TRACE(unique_id(), "RF freq = " << rf_freq); UHD_ASSERT_THROW(rf_freq >= 0); |