diff options
Diffstat (limited to 'host/lib/usrp/dboard')
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 + ); +} |