aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard
diff options
context:
space:
mode:
authormattprost <matt.prost@ni.com>2022-02-24 11:45:49 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2022-03-03 14:02:04 -0600
commit08ab1925be4bccf47ca10b121a076b350bc8e79e (patch)
treea9f37f71cc85e223a629f75910ad1c3a061a11da /host/lib/usrp/dboard
parent60ca903776c5e6c676a52551f45a8a09d2dfe374 (diff)
downloaduhd-08ab1925be4bccf47ca10b121a076b350bc8e79e.tar.gz
uhd-08ab1925be4bccf47ca10b121a076b350bc8e79e.tar.bz2
uhd-08ab1925be4bccf47ca10b121a076b350bc8e79e.zip
N310: Deactivate frontend components on radio shutdown
Make sure no active components are connected to the TX frontend during next boot. This avoids configurations that could generate unwanted tones during operations such as the Mykonos init cals. Signed-off-by: mattprost <matt.prost@ni.com>
Diffstat (limited to 'host/lib/usrp/dboard')
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp6
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp6
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_control_cpld.cpp23
3 files changed, 35 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp
index 637d85d49..a2de485e3 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp
@@ -129,6 +129,12 @@ magnesium_radio_control_impl::magnesium_radio_control_impl(make_args_ptr make_ar
_init_prop_tree();
}
+void magnesium_radio_control_impl::deinit()
+{
+ RFNOC_LOG_TRACE("magnesium_radio_control_impl::deinit()");
+ _reset_tx_frontend(magnesium_cpld_ctrl::BOTH);
+}
+
magnesium_radio_control_impl::~magnesium_radio_control_impl()
{
RFNOC_LOG_TRACE("magnesium_radio_control_impl::dtor() ");
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp
index f80f75f00..edc417cfe 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp
@@ -67,6 +67,9 @@ public:
* Structors
***********************************************************************/
magnesium_radio_control_impl(make_args_ptr make_args);
+
+ void deinit() override;
+
~magnesium_radio_control_impl() override;
/************************************************************************
@@ -270,6 +273,9 @@ private:
const double freq,
const size_t chan);
+ //! Deactivate idle-state TX frontend components
+ void _reset_tx_frontend(const magnesium_cpld_ctrl::chan_sel_t chan_sel);
+
/**************************************************************************
* Private attributes
*************************************************************************/
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_control_cpld.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_control_cpld.cpp
index a4decdaaa..2edfa50bd 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_control_cpld.cpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_control_cpld.cpp
@@ -294,3 +294,26 @@ void magnesium_radio_control_impl::_update_tx_freq_switches(const double freq,
enable_lowband_mixer,
magnesium_cpld_ctrl::ON);
}
+
+void magnesium_radio_control_impl::_reset_tx_frontend(
+ const magnesium_cpld_ctrl::chan_sel_t chan_sel)
+{
+ RFNOC_LOG_TRACE("magnesium_radio_control_impl::_reset_tx_frontend()");
+
+ // Deactivate idle state frontend components
+ _cpld->set_tx_switches(chan_sel,
+ magnesium_cpld_ctrl::TX_SW1_SHUTDOWNTXSW1,
+ magnesium_cpld_ctrl::TX_SW2_TOTXFILTERLP3400MHZ,
+ magnesium_cpld_ctrl::TX_SW3_BYPASSPATHTOTRXSW,
+ magnesium_cpld_ctrl::LOWBAND_MIXER_PATH_SEL_BYPASS,
+ false, // disable lowband mixer
+ magnesium_cpld_ctrl::IDLE,
+ true);
+ _cpld->set_tx_atr_bits(chan_sel,
+ magnesium_cpld_ctrl::IDLE,
+ false, // disable LED
+ false, // disable PA
+ false, // disable AMP
+ true // enable Mykonos
+ );
+}