aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/dboard/twinrx/twinrx_experts.cpp')
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_experts.cpp33
1 files changed, 27 insertions, 6 deletions
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp b/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp
index d196d99e2..8d3ba591b 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp
@@ -617,7 +617,10 @@ void twinrx_settings_expert::_resolve_lox_freq(lo_stage_t lo_stage,
bool hopping_enabled)
{
if (ch0_lo_source == twinrx_ctrl::LO_EXTERNAL) {
- // If the LO is external then we don't need to program any synthesizers
+ if (synth0_mapping != MAPPING_CH1) {
+ // Tune the internal LO away to avoid interference
+ _set_lox_synth_freq(lo_stage, twinrx_ctrl::CH1, ch0_freq_d + 100e6);
+ }
ch0_freq_c = ch0_freq_d;
} else {
// When in hopping mode, only attempt to write the LO frequency if it is actually
@@ -631,15 +634,24 @@ void twinrx_settings_expert::_resolve_lox_freq(lo_stage_t lo_stage,
ch0_freq_c = _set_lox_synth_freq(lo_stage, twinrx_ctrl::CH2, ch0_freq_d);
} else if (synth0_mapping == MAPPING_SHARED or synth1_mapping == MAPPING_SHARED) {
// If any synthesizer is being shared then we are not in hopping mode
+ // Tune the LO being shared
twinrx_ctrl::channel_t ch =
(synth0_mapping == MAPPING_SHARED) ? twinrx_ctrl::CH1 : twinrx_ctrl::CH2;
ch0_freq_c = _set_lox_synth_freq(lo_stage, ch, ch0_freq_d);
ch1_freq_c = ch0_freq_c;
+
+ // Tune the synthesizer of the other channel away to avoid interference
+ twinrx_ctrl::channel_t other_ch =
+ (synth0_mapping == MAPPING_SHARED) ? twinrx_ctrl::CH2 : twinrx_ctrl::CH1;
+ _set_lox_synth_freq(lo_stage, other_ch, ch0_freq_d + 100e6);
}
}
if (ch1_lo_source == twinrx_ctrl::LO_EXTERNAL) {
- // If the LO is external then we don't need to program any synthesizers
+ if (synth1_mapping != MAPPING_CH0) {
+ // Tune the internal LO away to avoid interference
+ _set_lox_synth_freq(lo_stage, twinrx_ctrl::CH2, ch1_freq_d + 100e6);
+ }
ch1_freq_c = ch1_freq_d;
} else {
// When in hopping mode, only attempt to write the LO frequency if it is actually
@@ -655,10 +667,19 @@ void twinrx_settings_expert::_resolve_lox_freq(lo_stage_t lo_stage,
ch1_freq_c = _set_lox_synth_freq(lo_stage, twinrx_ctrl::CH2, ch1_freq_d);
} else if (synth0_mapping == MAPPING_SHARED or synth1_mapping == MAPPING_SHARED) {
// If any synthesizer is being shared then we are not in hopping mode
- twinrx_ctrl::channel_t ch =
- (synth0_mapping == MAPPING_SHARED) ? twinrx_ctrl::CH1 : twinrx_ctrl::CH2;
- ch0_freq_c = _set_lox_synth_freq(lo_stage, ch, ch0_freq_d);
- ch1_freq_c = ch0_freq_c;
+ // Tuning has already been done above if CH0 LO source is not external
+ if (ch0_lo_source == twinrx_ctrl::LO_EXTERNAL) {
+ // Tune the LO being shared
+ twinrx_ctrl::channel_t ch =
+ (synth0_mapping == MAPPING_SHARED) ? twinrx_ctrl::CH1 : twinrx_ctrl::CH2;
+ ch0_freq_c = _set_lox_synth_freq(lo_stage, ch, ch0_freq_d);
+ ch1_freq_c = ch0_freq_c;
+
+ // Tune the synthesizer of the other channel away to avoid interference
+ twinrx_ctrl::channel_t other_ch =
+ (synth0_mapping == MAPPING_SHARED) ? twinrx_ctrl::CH2 : twinrx_ctrl::CH1;
+ _set_lox_synth_freq(lo_stage, other_ch, ch0_freq_d + 100e6);
+ }
}
}
}