X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETMSP430.py;h=adbfd1561284a3052067e8c17fc5dd87f633ca86;hp=a70c6566239306eb1eb5a87f13fe7672b43a6754;hb=d275b26024122967b01e4a6cfb02e53ab7c1371b;hpb=a4a0d6f5ac4e10d890a4a2e4ac2ee3caef810c69 diff --git a/client/GoodFETMSP430.py b/client/GoodFETMSP430.py index a70c656..adbfd15 100644 --- a/client/GoodFETMSP430.py +++ b/client/GoodFETMSP430.py @@ -38,7 +38,7 @@ class GoodFETMSP430(GoodFET): return DeviceID; def peek16(self,adr,memory="vn"): return self.MSP430peek(adr); - def peek8(self,address, memory="vn"): + def peek8(self,adr, memory="vn"): adr=self.MSP430peek(adr&~1); if adr&1==0: return adr&0xFF; else: return adr>>8; @@ -87,6 +87,11 @@ class GoodFETMSP430(GoodFET): """Start debugging.""" self.writecmd(self.MSP430APP,0x20,0,self.data); self.JTAGID=ord(self.data[0]); + if(not (self.JTAGID==0x89 or self.JTAGID==0x91)): + #Try once more + self.writecmd(self.MSP430APP,0x20,0,self.data); + self.JTAGID=ord(self.data[0]); + #print "Identified as %02x." % self.JTAGID; if(not (self.JTAGID==0x89 or self.JTAGID==0x91)): print "Error, misidentified as %02x.\nCheck wiring, as this should be 0x89 or 0x91." % self.JTAGID;