Explicity setDTR. Matt Carpenter says this should be neighborly.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 7 Jan 2010 12:51:20 +0000 (12:51 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 7 Jan 2010 12:51:20 +0000 (12:51 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@259 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFET.py

index cfc2079..70e383e 100755 (executable)
@@ -40,8 +40,12 @@ class GoodFET:
             parity = serial.PARITY_NONE
             )
         
             parity = serial.PARITY_NONE
             )
         
-        #Explicitly set RTS
+        #This might cause problems, but it makes failure graceful.
+        #self.serialport._timeout = 5;
+        
+        #Explicitly set RTS and DTR to halt board.
         self.serialport.setRTS(1);
         self.serialport.setRTS(1);
+        self.serialport.setDTR(1);
         #Drop DTR, which is !RST, low to begin the app.
         self.serialport.setDTR(0);
         self.serialport.flushInput()
         #Drop DTR, which is !RST, low to begin the app.
         self.serialport.setDTR(0);
         self.serialport.flushInput()