aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-06-18 18:21:30 -0700
committerMartin Braun <martin.braun@ettus.com>2018-08-02 12:37:34 -0700
commit5f624d6592c82d65c14d2d81e6add5147a77c39c (patch)
tree323bf2e003fadbfb113656d08dccedccb99623c9
parent98057752006b5c567ed331c5b14e3b8a281b83b9 (diff)
downloaduhd-5f624d6592c82d65c14d2d81e6add5147a77c39c.tar.gz
uhd-5f624d6592c82d65c14d2d81e6add5147a77c39c.tar.bz2
uhd-5f624d6592c82d65c14d2d81e6add5147a77c39c.zip
mpm: mg: periphs: Modify AD9361 reset function to keep it in reset
-rw-r--r--mpm/python/usrp_mpm/dboard_manager/mg_periphs.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/mg_periphs.py b/mpm/python/usrp_mpm/dboard_manager/mg_periphs.py
index 2f74ce11c..fb014cf54 100644
--- a/mpm/python/usrp_mpm/dboard_manager/mg_periphs.py
+++ b/mpm/python/usrp_mpm/dboard_manager/mg_periphs.py
@@ -190,12 +190,19 @@ class MgCPLD(object):
mask = (1<<4) if which.lower() == 'tx' else 1
return bool(self.peek16(self.REG_LO_STATUS & mask))
- def reset_mykonos(self):
+ def reset_mykonos(self, keep_in_reset=False):
"""
- Hard-resets Mykonos
+ Hard-resets Mykonos.
+
+ Arguments:
+ keep_in_reset -- If True, Mykonos will stay in reset. Otherwise, it will
+ simply pulse the reset and Mykonos will be out of reset
+ once the function returns
"""
self.log.debug("Resetting AD9371!")
self.poke16(self.REG_MYK_CTRL, 0x1)
+ if keep_in_reset:
+ return
time.sleep(0.001) # No spec here, but give it some time to reset.
self.poke16(self.REG_MYK_CTRL, 0x0)
time.sleep(0.001) # No spec here, but give it some time to reset.