aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Anderseck <martin.anderseck@ni.com>2021-10-01 11:52:03 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2021-10-12 12:56:15 -0700
commit393ab38853a9db513d54b03c3821712295b58846 (patch)
tree7d72bf220f24ef314d6bf326d8de007c32cb9b22
parent748162e6a9a018f6cf377be8f9a68a7445060336 (diff)
downloaduhd-393ab38853a9db513d54b03c3821712295b58846.tar.gz
uhd-393ab38853a9db513d54b03c3821712295b58846.tar.bz2
uhd-393ab38853a9db513d54b03c3821712295b58846.zip
mpm: Fix handling of rfic_digital_loopback argument
In mpm arguments are handled as key=value pairs. Therefore setting rfic_digital_loopback to 0 should disable the digital data loopback inside the RFIC on N310. This fixes this behavior by correctly casting from string to boolean but keeps the full re-init sequence when using the rfic_digital_loopback flag.
-rw-r--r--mpm/python/usrp_mpm/dboard_manager/mg_init.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/mg_init.py b/mpm/python/usrp_mpm/dboard_manager/mg_init.py
index 5bd2d217a..00a2eab7d 100644
--- a/mpm/python/usrp_mpm/dboard_manager/mg_init.py
+++ b/mpm/python/usrp_mpm/dboard_manager/mg_init.py
@@ -18,7 +18,7 @@ from usrp_mpm.dboard_manager.lmk_mg import LMK04828Mg
from usrp_mpm.dboard_manager.mg_periphs import DboardClockControl
from usrp_mpm.cores import ClockSynchronizer
from usrp_mpm.cores import nijesdcore
-from usrp_mpm.mpmutils import async_exec
+from usrp_mpm.mpmutils import async_exec, str2bool
INIT_CALIBRATION_TABLE = {"TX_BB_FILTER" : 0x0001,
"ADC_TUNER" : 0x0002,
@@ -602,9 +602,9 @@ class MagnesiumInitManager(object):
# TODO: Maybe we can switch to digital loopback without running the
# initialization. For now, force init when rfic_digital_loopback is
# set because we're being conservative.
- if bool(args.get('rfic_digital_loopback')):
- self.log.debug("Using rfic_digital_loopback causes a full "
- "re-init sequence.")
+ if 'rfic_digital_loopback' in args:
+ self.log.debug("Using rfic_digital_loopback flag causes a "
+ "full re-init sequence.")
fast_reinit = False
# If we can't do fast re-init, start from scratch:
if not fast_reinit:
@@ -621,7 +621,7 @@ class MagnesiumInitManager(object):
self.log.debug(
"{}={}".format(arg_key, args.get(arg_key, arg_default)))
return True
- if bool(args.get('rfic_digital_loopback')):
+ if str2bool(args.get('rfic_digital_loopback')):
self.log.warning(
"RF Functionality Disabled: JESD204b digital loopback "
"enabled inside Mykonos!")