diff options
author | Alex Williams <alex.williams@ni.com> | 2017-10-30 16:34:57 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:05:05 -0800 |
commit | 70b0cc263cae1fa71848e72db5eafe1cb4fac967 (patch) | |
tree | 1c44993ddf1ee3590e514918ad87c3bdc9f3d9ee /host | |
parent | b48cc6c48040eb89dd4e8072616cd26504731ba3 (diff) | |
download | uhd-70b0cc263cae1fa71848e72db5eafe1cb4fac967.tar.gz uhd-70b0cc263cae1fa71848e72db5eafe1cb4fac967.tar.bz2 uhd-70b0cc263cae1fa71848e72db5eafe1cb4fac967.zip |
mg: Add support for TX switches.
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp | 60 |
1 files changed, 58 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 9240a9bdd..fe386aa38 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp @@ -749,7 +749,9 @@ void magnesium_radio_ctrl_impl::_update_freq_switches( const size_t chan, const direction_t dir ){ - UHD_LOG_TRACE("MAGNESIUM", "Update all freq related switches for " << freq); + UHD_LOG_TRACE("MAGNESIUM", "Update all freq related switches for " << freq); + magnesium_cpld_ctrl::chan_sel_t chan_sel = (_radio_slot == "A" or _radio_slot == "C")? magnesium_cpld_ctrl::CHAN1 : magnesium_cpld_ctrl::CHAN2; + // Set filters based on frequency if (dir == RX_DIRECTION) { if (freq < MAGNESIUM_RX_BAND1_MIN_FREQ) { @@ -831,12 +833,66 @@ void magnesium_radio_ctrl_impl::_update_freq_switches( ); } } else { - //TODO : rememeber to cache _sw_trx for chan if (freq < MAGNESIUM_TX_BAND1_MIN_FREQ) { + _cpld->set_tx_switches( + magnesium_cpld_ctrl::BOTH, + magnesium_cpld_ctrl::SW_TRX_FROMLOWERFILTERBANKTXSW1, + magnesium_cpld_ctrl::TX_SW1_FROMTXFILTERLP0800MHZ, + magnesium_cpld_ctrl::TX_SW2_TOTXFILTERLP0800MHZ, + magnesium_cpld_ctrl::TX_SW3_TOTXFILTERBANKS, + magnesium_cpld_ctrl::LOWBAND_MIXER_PATH_SEL_LOBAND, + true, + magnesium_cpld_ctrl::ON + ); + _sw_trx[chan_sel] = magnesium_cpld_ctrl::SW_TRX_FROMLOWERFILTERBANKTXSW1; } else if (freq < MAGNESIUM_TX_BAND2_MIN_FREQ) { + _cpld->set_tx_switches( + magnesium_cpld_ctrl::BOTH, + magnesium_cpld_ctrl::SW_TRX_FROMLOWERFILTERBANKTXSW1, + magnesium_cpld_ctrl::TX_SW1_FROMTXFILTERLP0800MHZ, + magnesium_cpld_ctrl::TX_SW2_TOTXFILTERLP0800MHZ, + magnesium_cpld_ctrl::TX_SW3_TOTXFILTERBANKS, + magnesium_cpld_ctrl::LOWBAND_MIXER_PATH_SEL_BYPASS, + false, + magnesium_cpld_ctrl::ON + ); + _sw_trx[chan_sel] = magnesium_cpld_ctrl::SW_TRX_FROMLOWERFILTERBANKTXSW1; } else if (freq < MAGNESIUM_TX_BAND3_MIN_FREQ) { + _cpld->set_tx_switches( + magnesium_cpld_ctrl::BOTH, + magnesium_cpld_ctrl::SW_TRX_FROMLOWERFILTERBANKTXSW1, + magnesium_cpld_ctrl::TX_SW1_FROMTXFILTERLP1700MHZ, + magnesium_cpld_ctrl::TX_SW2_TOTXFILTERLP1700MHZ, + magnesium_cpld_ctrl::TX_SW3_TOTXFILTERBANKS, + magnesium_cpld_ctrl::LOWBAND_MIXER_PATH_SEL_BYPASS, + false, + magnesium_cpld_ctrl::ON + ); + _sw_trx[chan_sel] = magnesium_cpld_ctrl::SW_TRX_FROMLOWERFILTERBANKTXSW1; } else if (freq < MAGNESIUM_TX_BAND4_MIN_FREQ) { + _cpld->set_tx_switches( + magnesium_cpld_ctrl::BOTH, + magnesium_cpld_ctrl::SW_TRX_FROMLOWERFILTERBANKTXSW1, + magnesium_cpld_ctrl::TX_SW1_FROMTXFILTERLP3400MHZ, + magnesium_cpld_ctrl::TX_SW2_TOTXFILTERLP3400MHZ, + magnesium_cpld_ctrl::TX_SW3_TOTXFILTERBANKS, + magnesium_cpld_ctrl::LOWBAND_MIXER_PATH_SEL_BYPASS, + false, + magnesium_cpld_ctrl::ON + ); + _sw_trx[chan_sel] = magnesium_cpld_ctrl::SW_TRX_FROMLOWERFILTERBANKTXSW1; } else { + _cpld->set_tx_switches( + magnesium_cpld_ctrl::BOTH, + magnesium_cpld_ctrl::SW_TRX_FROMTXUPPERFILTERBANKLP6400MHZ, + magnesium_cpld_ctrl::TX_SW1_SHUTDOWNTXSW1, + magnesium_cpld_ctrl::TX_SW2_TOTXFILTERLP6400MHZ, + magnesium_cpld_ctrl::TX_SW3_TOTXFILTERBANKS, + magnesium_cpld_ctrl::LOWBAND_MIXER_PATH_SEL_BYPASS, + false, + magnesium_cpld_ctrl::ON + ); + _sw_trx[chan_sel] = magnesium_cpld_ctrl::SW_TRX_FROMTXUPPERFILTERBANKLP6400MHZ; } } UHD_LOG_INFO("MAGNESIUM", "Update all freq related switches for " << freq <<" finished!."); |