r4651 - developers/werner/wlan-spi/vds

werner at docs.openmoko.org werner at docs.openmoko.org
Tue Sep 16 16:58:40 CEST 2008


Author: werner
Date: 2008-09-16 16:58:40 +0200 (Tue, 16 Sep 2008)
New Revision: 4651

Modified:
   developers/werner/wlan-spi/vds/bd.py
   developers/werner/wlan-spi/vds/vds.py
Log:
- vds.py: capture (almost) all the SDIO traffic generated when booting
- bd.py: if a session contains no data, e.g., because there was a delay between
  setting the trigger and starting the command, don't try to decode the 
  nothingness



Modified: developers/werner/wlan-spi/vds/bd.py
===================================================================
--- developers/werner/wlan-spi/vds/bd.py	2008-09-16 14:40:57 UTC (rev 4650)
+++ developers/werner/wlan-spi/vds/bd.py	2008-09-16 14:58:40 UTC (rev 4651)
@@ -28,7 +28,15 @@
     cmd = mosi.get(edges)
     resp = miso.get(edges)
 
-    print name, d_sdio_cmd(cmd, True), d_sdio_r5_spi(resp, True)
+    print name,
+    if len(cmd):
+	print d_sdio_cmd(cmd, True),
+    else:
+	print "---",
+    if len(resp):
+	print d_sdio_r5_spi(resp, True)
+    else:
+	print "---"
 
 
 for arg in argv[1:]:

Modified: developers/werner/wlan-spi/vds/vds.py
===================================================================
--- developers/werner/wlan-spi/vds/vds.py	2008-09-16 14:40:57 UTC (rev 4650)
+++ developers/werner/wlan-spi/vds/vds.py	2008-09-16 14:58:40 UTC (rev 4651)
@@ -4,6 +4,14 @@
 from tmc.trigger import *
 import os, time
 
+#
+# In a typical session, 176-181 command are sent. We set the limit to 175, so
+# that we don't hang in a short session. In case this happens anyway, just
+# restarting the device will fix the problem, as long as the limit is within a
+# session length that occurs reasonably often.
+#
+n = 175
+
 s = rigol_ds1000c()
 
 s.hor.pos = 0
@@ -26,12 +34,14 @@
 	pass
 
 
-for i in range(0, 100):
+for i in range(0, n):
     # pseudo-randomize the trigger time to that we collect samples from a wider
     # range more quickly
-    tr = (i*41) % 100
+    tr = (i*41) % n
 
-    for rep in range(0, 3):
+    for rep in range(0, 2):
+	id = "%03d-%d" % (tr, rep)
+
 	# reset trigger
 	system("ssh lab neo ./gpio f6=zr")
 
@@ -49,8 +59,8 @@
 	    time.sleep(1)
 
 	# grab the transmission(s) - a bit before the message and a lot after
-	w = s.wave([ch, 1, 2, 3, 4, 5, 6], start = -1e-3, end = 1e-3)
-	w.save("sdio-"+str(tr)+"-"+str(rep))
+	w = s.wave([ch, 1, 2, 3, 4, 5, 6], start = -0.5e-3, end = 1e-3)
+	w.save("sdio-"+id)
 
 	# Give the system time to finish booting
 	print "Saved", i, tr, rep
@@ -58,4 +68,4 @@
 	print "AWAKE"
 
 	# record the kernel messages as well
-	os.system("ssh lab neo dmesg -s 2000000 >dmesg-"+str(tr)+"-"+str(rep))
+	os.system("ssh lab neo dmesg -s 2000000 >dmesg-"+id)




More information about the commitlog mailing list