From db7039f8be4240b60cf2688d7ae6b41613fc8a5a Mon Sep 17 00:00:00 2001 From: Trung N Tran Date: Wed, 15 Nov 2017 13:49:39 -0800 Subject: 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" --- mpm/python/usrp_mpm/dboard_manager/magnesium.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mpm/python') diff --git a/mpm/python/usrp_mpm/dboard_manager/magnesium.py b/mpm/python/usrp_mpm/dboard_manager/magnesium.py index d69b8ad23..570887870 100644 --- a/mpm/python/usrp_mpm/dboard_manager/magnesium.py +++ b/mpm/python/usrp_mpm/dboard_manager/magnesium.py @@ -557,6 +557,17 @@ class Magnesium(DboardManagerBase): self.log.trace("Pulsing Mykonos Hard Reset...") self.cpld.reset_mykonos() self.log.trace("Initializing Mykonos...") + rx_lo_source = args.get('rx_lo_source', "internal") + rx_lo = -1 + if rx_lo_source == "internal": + rx_lo = 0 + if rx_lo_source == "external": + rx_lo = 1 + if rx_lo == -1: + self.log.warning("Please specify rx LO either \"internal\" or \"external\" ") + else: + self.mykonos.update_rx_lo_source(rx_lo) + self.log.debug("RX LO SOURCE is {}".format(self.mykonos.get_rx_lo_source())) self.mykonos.begin_initialization() # Multi-chip Sync requires two SYSREF pulses at least 17us apart. self.jesdcore.send_sysref_pulse() -- cgit v1.2.3