aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-12-09 11:41:18 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2022-01-10 16:21:48 -0600
commit8a4f5b7c4df40666257b65fea9c10d1a9980cbd0 (patch)
tree3a2bba3846e5ce6ed922be7972212f7d21688d74 /host/lib/usrp/dboard
parent699870d7dec67b43c08e55fcc1d4e159a337c49a (diff)
downloaduhd-8a4f5b7c4df40666257b65fea9c10d1a9980cbd0.tar.gz
uhd-8a4f5b7c4df40666257b65fea9c10d1a9980cbd0.tar.bz2
uhd-8a4f5b7c4df40666257b65fea9c10d1a9980cbd0.zip
e3xx: Fix frequency querying
The E3xx devices have one LO per TX/RX, respectively. That means when changing the frequency on channel 0, the frequency on channel 1 also gets changed. The code didn't track this change properly: When setting channel 1, channel 0's frequency didn't match.
Diffstat (limited to 'host/lib/usrp/dboard')
-rw-r--r--host/lib/usrp/dboard/e3xx/e3xx_radio_control_impl.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/host/lib/usrp/dboard/e3xx/e3xx_radio_control_impl.cpp b/host/lib/usrp/dboard/e3xx/e3xx_radio_control_impl.cpp
index 68f0bfeaf..09be505fc 100644
--- a/host/lib/usrp/dboard/e3xx/e3xx_radio_control_impl.cpp
+++ b/host/lib/usrp/dboard/e3xx/e3xx_radio_control_impl.cpp
@@ -224,7 +224,12 @@ double e3xx_radio_control_impl::set_tx_frequency(const double freq, const size_t
double coerced_freq =
_ad9361->tune(get_which_ad9361_chain(TX_DIRECTION, chan, _fe_swap), clipped_freq);
- radio_control_impl::set_tx_frequency(coerced_freq, chan);
+ // The E3xx devices have one LO for TX, so if we change one channel's
+ // frequency, we change the other, too
+ for (size_t chan_idx = 0; chan_idx < E3XX_NUM_CHANS; ++chan_idx) {
+ radio_control_impl::set_tx_frequency(coerced_freq, chan_idx);
+ }
+
// Front-end switching
_set_atr_bits(chan);
@@ -240,7 +245,11 @@ double e3xx_radio_control_impl::set_rx_frequency(const double freq, const size_t
double coerced_freq =
_ad9361->tune(get_which_ad9361_chain(RX_DIRECTION, chan, _fe_swap), clipped_freq);
- radio_control_impl::set_rx_frequency(coerced_freq, chan);
+ // The E3xx devices have one LO for RX, so if we change one channel's
+ // frequency, we change the other, too
+ for (size_t chan_idx = 0; chan_idx < E3XX_NUM_CHANS; ++chan_idx) {
+ radio_control_impl::set_rx_frequency(coerced_freq, chan_idx);
+ }
// Front-end switching
_set_atr_bits(chan);