aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-05-26 14:15:11 -0700
committerMartin Braun <martin.braun@ettus.com>2016-05-26 14:15:11 -0700
commit42b9b0691b08d51be2d756c9a0f9041305047b29 (patch)
tree442e6e5cbd37ae10419ca92d4f7e3fba60427681 /host/lib/usrp/dboard
parent9046188eb890a2b6dcb813fb365b2a863f94529d (diff)
parentc83e7f747c4060f9196c5c1ee247fc3b18f49975 (diff)
downloaduhd-42b9b0691b08d51be2d756c9a0f9041305047b29.tar.gz
uhd-42b9b0691b08d51be2d756c9a0f9041305047b29.tar.bz2
uhd-42b9b0691b08d51be2d756c9a0f9041305047b29.zip
Merge branch 'maint'
Diffstat (limited to 'host/lib/usrp/dboard')
-rw-r--r--host/lib/usrp/dboard/db_ubx.cpp60
1 files changed, 37 insertions, 23 deletions
diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp
index 3334c2cd0..bf932a3a4 100644
--- a/host/lib/usrp/dboard/db_ubx.cpp
+++ b/host/lib/usrp/dboard/db_ubx.cpp
@@ -698,13 +698,22 @@ private:
//validate input
assert_has(ubx_rx_antennas, ant, "ubx rx antenna name");
- if(ant == "RX2")
- set_gpio_field(RX_ANT, 1);
- else if(ant == "TX/RX")
+ // Due to an issue with TX path into to the RF switch (U32), there
+ // is a long transient at the beginning of transmission when the RX
+ // antenna is set to RX2. Forcing on the TX PA removes the transient,
+ // so it is forced on only when the RX2 antenna is selected. It is
+ // cleared when the TX/RX antenna is selected to avoid a higher noise
+ // floor on RX.
+ if (ant == "TX/RX")
+ {
set_gpio_field(RX_ANT, 0);
- else if (ant == "CAL")
+ set_cpld_field(TXDRV_FORCEON, 0); // Turn off PA in TDD mode
+ } else {
set_gpio_field(RX_ANT, 1);
+ set_cpld_field(TXDRV_FORCEON, 1); // Keep PA on
+ }
write_gpio();
+ write_cpld_reg();
}
/***********************************************************************
@@ -1103,28 +1112,32 @@ private:
boost::mutex::scoped_lock lock(_mutex);
if (mode == "performance")
{
- // FIXME: Response to ATR change is too slow for some components,
- // so certain components are forced on here. Force on does not
- // necessarily mean immediately. Some FORCEON lines are still gated
- // by other bits in the CPLD register that are asserted during
+ /*
+ // Placeholders in case some components need to be forced on to
+ // reduce settling time. Note that some FORCEON lines are still gated
+ // by other bits in the CPLD register are are asserted during
// frequency tuning.
- set_cpld_field(RXAMP_FORCEON, 1);
- set_cpld_field(RXDEMOD_FORCEON, 1);
- set_cpld_field(RXDRV_FORCEON, 1);
- set_cpld_field(RXMIXER_FORCEON, 1);
- set_cpld_field(RXLO1_FORCEON, 1);
- set_cpld_field(RXLO2_FORCEON, 1);
- set_cpld_field(RXLNA1_FORCEON, 1);
- set_cpld_field(RXLNA2_FORCEON, 1);
- set_cpld_field(TXDRV_FORCEON, 1);
- set_cpld_field(TXMOD_FORCEON, 1);
- set_cpld_field(TXMIXER_FORCEON, 1);
- set_cpld_field(TXLO1_FORCEON, 1);
- set_cpld_field(TXLO2_FORCEON, 1);
+ set_cpld_field(RXAMP_FORCEON, 0);
+ set_cpld_field(RXDEMOD_FORCEON, 0);
+ set_cpld_field(RXDRV_FORCEON, 0);
+ set_cpld_field(RXMIXER_FORCEON, 0);
+ set_cpld_field(RXLO1_FORCEON, 0);
+ set_cpld_field(RXLO2_FORCEON, 0);
+ set_cpld_field(RXLNA1_FORCEON, 0);
+ set_cpld_field(RXLNA2_FORCEON, 0);
+ //set_cpld_field(TXDRV_FORCEON, 1); // controlled by RX antenna selection
+ set_cpld_field(TXMOD_FORCEON, 0);
+ set_cpld_field(TXMIXER_FORCEON, 0);
+ set_cpld_field(TXLO1_FORCEON, 0);
+ set_cpld_field(TXLO2_FORCEON, 0);
+ write_cpld_reg();
+ */
_power_mode = PERFORMANCE;
}
else if (mode == "powersave")
{
+ /*
+ // Placeholders in case force on bits need to be set or cleared.
set_cpld_field(RXAMP_FORCEON, 0);
set_cpld_field(RXDEMOD_FORCEON, 0);
set_cpld_field(RXDRV_FORCEON, 0);
@@ -1133,14 +1146,15 @@ private:
set_cpld_field(RXLO2_FORCEON, 0);
set_cpld_field(RXLNA1_FORCEON, 0);
set_cpld_field(RXLNA2_FORCEON, 0);
- set_cpld_field(TXDRV_FORCEON, 0);
+ //set_cpld_field(TXDRV_FORCEON, 1); // controlled by RX antenna selection
set_cpld_field(TXMOD_FORCEON, 0);
set_cpld_field(TXMIXER_FORCEON, 0);
set_cpld_field(TXLO1_FORCEON, 0);
set_cpld_field(TXLO2_FORCEON, 0);
+ write_cpld_reg();
+ */
_power_mode = POWERSAVE;
}
- write_cpld_reg();
}
void set_xcvr_mode(std::string mode)