aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/include
diff options
context:
space:
mode:
authorTrung N Tran <trung.tran@ettus.com>2017-11-15 13:49:39 -0800
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:05:06 -0800
commitdb7039f8be4240b60cf2688d7ae6b41613fc8a5a (patch)
tree7f1de9ea37847d8071814f6c75c2da50ae5e7ff6 /mpm/include
parent9ea0d6da9e3756af91c7d1e99ee35e56bf2270d6 (diff)
downloaduhd-db7039f8be4240b60cf2688d7ae6b41613fc8a5a.tar.gz
uhd-db7039f8be4240b60cf2688d7ae6b41613fc8a5a.tar.bz2
uhd-db7039f8be4240b60cf2688d7ae6b41613fc8a5a.zip
mpm: enable RX external LO set through args
This change allow user to set RX LO of ad9371 to external or internal from args constructor of usrp device. new args is rx_lo_source value can be either internal or external: If there's no rx_lo_source specified or invalid value, default rx_lo is used; which is internal LO. Usage example: usrp_application --args "rx_lo_source=external"
Diffstat (limited to 'mpm/include')
-rw-r--r--mpm/include/mpm/ad937x/ad937x_ctrl.hpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/mpm/include/mpm/ad937x/ad937x_ctrl.hpp b/mpm/include/mpm/ad937x/ad937x_ctrl.hpp
index 22029a135..4710af445 100644
--- a/mpm/include/mpm/ad937x/ad937x_ctrl.hpp
+++ b/mpm/include/mpm/ad937x/ad937x_ctrl.hpp
@@ -107,14 +107,22 @@ public:
mpm::ad937x::gpio::gain_pins_t gain_pins);
virtual ~ad937x_ctrl(void) {}
+ //! Update rx lo source to either external or internal. 1 is external; 0 is internal
+ virtual void update_rx_lo_source(uint8_t rx_pll_use_external_lo) = 0;
+ //! Update tx lo source to either external or internal. 1 is external; 0 is internal
+ virtual void update_tx_lo_source(uint8_t tx_pll_use_external_lo) = 0;
+ //! Get rx lo source: 1 is external; 0 is internal
+ virtual uint8_t get_rx_lo_source() = 0 ;
+ //! Get tx lo source: 1 is external; 0 is internal
+ virtual uint8_t get_tx_lo_source() = 0 ;
//! initializes the AD9371, checks basic functionality, and prepares the chip to receive a SYSREF pulse
virtual void begin_initialization() = 0;
//! finishes initialization of the AD9371 by loading the ARM binary and setting a default RF configuration
virtual void finish_initialization() = 0;
-
+
/*! \setup initialization and tracking calibration
- *
+ *
*\param init_cals_mask bit masking field for init calibration default to 0x4DFF
* NOTE: this init cals mask need to be at least 0x4F.
*\param tracking_cals_mask bit masking field for tracking calibration default to 0xC3
@@ -262,6 +270,10 @@ void export_mykonos(){
bp::class_<ad937x_ctrl, boost::noncopyable, std::shared_ptr<ad937x_ctrl>>("ad937x_ctrl", bp::no_init)
.def("begin_initialization", &ad937x_ctrl::begin_initialization)
.def("finish_initialization", &ad937x_ctrl::finish_initialization)
+ .def("update_rx_lo_source", &ad937x_ctrl::update_rx_lo_source)
+ .def("update_tx_lo_source", &ad937x_ctrl::update_tx_lo_source)
+ .def("get_rx_lo_source", &ad937x_ctrl::get_rx_lo_source)
+ .def("get_tx_lo_source", &ad937x_ctrl::get_tx_lo_source)
.def("setup_cal", &ad937x_ctrl::setup_cal)
.def("start_jesd_rx", &ad937x_ctrl::start_jesd_rx)
.def("start_jesd_tx", &ad937x_ctrl::start_jesd_tx)