From 5f624d6592c82d65c14d2d81e6add5147a77c39c Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 18 Jun 2018 18:21:30 -0700 Subject: mpm: mg: periphs: Modify AD9361 reset function to keep it in reset --- mpm/python/usrp_mpm/dboard_manager/mg_periphs.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'mpm') 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. -- cgit v1.2.3