aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/n3xx_bist
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-10-03 16:03:17 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:04:02 -0800
commit1585af8814cd5eae7021f33bb229053dd5fcb08c (patch)
treec4ecf7b9aab33f737cbf4922fa9655061bfcea72 /mpm/python/n3xx_bist
parent9d3081e31556d2bedf8e4671c0082ceac52ac18f (diff)
downloaduhd-1585af8814cd5eae7021f33bb229053dd5fcb08c.tar.gz
uhd-1585af8814cd5eae7021f33bb229053dd5fcb08c.tar.bz2
uhd-1585af8814cd5eae7021f33bb229053dd5fcb08c.zip
mpm: n3xx_bist: Added more comments, clarified timeout units
Diffstat (limited to 'mpm/python/n3xx_bist')
-rwxr-xr-xmpm/python/n3xx_bist25
1 files changed, 18 insertions, 7 deletions
diff --git a/mpm/python/n3xx_bist b/mpm/python/n3xx_bist
index 514abf0e0..0f3d89de2 100755
--- a/mpm/python/n3xx_bist
+++ b/mpm/python/n3xx_bist
@@ -32,8 +32,12 @@ from datetime import datetime
import argparse
from six import iteritems
+# Timeout values are in seconds:
GPS_WARMUP_TIMEOUT = 70 # Data sheet says "about a minute"
-GPS_LOCKOK_TIMEOUT = 2 # Data sheet says about 15 minutes
+GPS_LOCKOK_TIMEOUT = 2 # Data sheet says about 15 minutes. Because our test
+ # does not necessarily require GPS lock to pass, we
+ # reduce this value in order for the BIST to pass faster
+ # by default.
##############################################################################
# Aurora/SFP BIST code
@@ -448,19 +452,26 @@ class N310BIST(object):
gpio_tca6424 = n310.TCA6424()
gpio_tca6424.set("PWREN-GPS")
time.sleep(5)
- gps_warmup_timeout = float(self.args.option.get('gps_warmup_timeout', GPS_WARMUP_TIMEOUT))
- gps_lockok_timeout = float(self.args.option.get('gps_lockok_timeout', GPS_LOCKOK_TIMEOUT))
+ gps_warmup_timeout = float(
+ self.args.option.get('gps_warmup_timeout', GPS_WARMUP_TIMEOUT))
+ gps_lockok_timeout = float(
+ self.args.option.get('gps_lockok_timeout', GPS_LOCKOK_TIMEOUT))
# Wait for WARMUP to go low
- sys.stderr.write("Waiting for WARMUP to go low...\n")
+ sys.stderr.write(
+ "Waiting for WARMUP to go low for up to {} seconds...\n".format(
+ gps_warmup_timeout))
if not poll_with_timeout(
lambda: not gpio_tca6424.get('GPS-WARMUP'),
gps_warmup_timeout*1000, 1000
):
- raise RuntimeError("GPS-WARMUP did not go low within one minute!")
+ raise RuntimeError(
+ "GPS-WARMUP did not go low within {} seconds!".format(
+ gps_warmup_timeout))
sys.stderr.write("Chip is warmed up.\n")
# Wait for LOCKOK. Data sheet says wait up to 15 minutes for GPS lock.
- sys.stderr.write("Waiting for LOCKOK to go high...\n")
- print(gps_lockok_timeout)
+ sys.stderr.write(
+ "Waiting for LOCKOK to go high for up to {} seconds...\n".format(
+ gps_lockok_timeout))
if not poll_with_timeout(
lambda: gpio_tca6424.get('GPS-LOCKOK'),
gps_lockok_timeout*1000,