summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-06-12 13:36:15 -0700
committerJosh Blum <josh@joshknows.com>2012-06-12 13:36:15 -0700
commitf8bf633965156d937b37a893ae243788413c0c26 (patch)
treeefcbd0fc675ff75f326bae12fa1be7a55f549eec /host
parenta80b715583de5f282bd3857348d982f2709ef770 (diff)
downloaduhd-f8bf633965156d937b37a893ae243788413c0c26.tar.gz
uhd-f8bf633965156d937b37a893ae243788413c0c26.tar.bz2
uhd-f8bf633965156d937b37a893ae243788413c0c26.zip
RFX: added support for calibration utils
Special CAL RX antenna rule: keep mixer enabled to reduce transients. 0 dB gains settings for RX and TX to deal with RFX sensitivity range.
Diffstat (limited to 'host')
-rw-r--r--host/docs/calibration.rst2
-rw-r--r--host/lib/usrp/dboard/db_rfx.cpp2
-rw-r--r--host/utils/usrp_cal_utils.hpp18
3 files changed, 17 insertions, 5 deletions
diff --git a/host/docs/calibration.rst b/host/docs/calibration.rst
index 680a74f3b..c97eebfd5 100644
--- a/host/docs/calibration.rst
+++ b/host/docs/calibration.rst
@@ -29,7 +29,7 @@ The following RF frontends are supported by the self-calibration utilities:
* WBX transceiver board
* SBX transceiver board
- * more to come...
+ * RFX transceiver board
********************************************
Calibration Utilities
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp
index d934be294..cf3b29ddc 100644
--- a/host/lib/usrp/dboard/db_rfx.cpp
+++ b/host/lib/usrp/dboard/db_rfx.cpp
@@ -272,7 +272,7 @@ void rfx_xcvr::set_rx_ant(const std::string &ant){
//set the rx atr regs that change with antenna setting
if (ant == "CAL") {
- this->get_iface()->set_atr_reg(dboard_iface::UNIT_RX, dboard_iface::ATR_REG_TX_ONLY, _power_up | ANT_TXRX | MIXER_DIS);
+ this->get_iface()->set_atr_reg(dboard_iface::UNIT_RX, dboard_iface::ATR_REG_TX_ONLY, _power_up | ANT_TXRX | MIXER_ENB);
this->get_iface()->set_atr_reg(dboard_iface::UNIT_RX, dboard_iface::ATR_REG_FULL_DUPLEX, _power_up | ANT_TXRX | MIXER_ENB);
this->get_iface()->set_atr_reg(dboard_iface::UNIT_RX, dboard_iface::ATR_REG_RX_ONLY, _power_up | MIXER_ENB | ANT_TXRX );
}
diff --git a/host/utils/usrp_cal_utils.hpp b/host/utils/usrp_cal_utils.hpp
index 825d94d64..43eca4d46 100644
--- a/host/utils/usrp_cal_utils.hpp
+++ b/host/utils/usrp_cal_utils.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2011-2012 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -68,7 +68,13 @@ static inline void set_optimum_defaults(uhd::usrp::multi_usrp::sptr usrp){
const uhd::fs_path tx_fe_path = "/mboards/0/dboards/A/tx_frontends/0";
const std::string tx_name = tree->access<std::string>(tx_fe_path / "name").get();
- if (tx_name.find("WBX") != std::string::npos or tx_name.find("SBX") != std::string::npos){
+ if (tx_name.find("WBX") != std::string::npos){
+ usrp->set_tx_gain(0);
+ }
+ if (tx_name.find("SBX") != std::string::npos){
+ usrp->set_tx_gain(0);
+ }
+ if (tx_name.find("RFX") != std::string::npos){
usrp->set_tx_gain(0);
}
else{
@@ -77,9 +83,15 @@ static inline void set_optimum_defaults(uhd::usrp::multi_usrp::sptr usrp){
const uhd::fs_path rx_fe_path = "/mboards/0/dboards/A/tx_frontends/0";
const std::string rx_name = tree->access<std::string>(rx_fe_path / "name").get();
- if (rx_name.find("WBX") != std::string::npos or rx_name.find("SBX") != std::string::npos){
+ if (rx_name.find("WBX") != std::string::npos){
usrp->set_rx_gain(25);
}
+ if (rx_name.find("SBX") != std::string::npos){
+ usrp->set_rx_gain(25);
+ }
+ if (rx_name.find("RFX") != std::string::npos){
+ usrp->set_rx_gain(0);
+ }
else{
throw std::runtime_error("self-calibration is not supported for this hardware");
}