X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETMSP430.py;h=e7cc36863110d99fdf5291a30ebace9d8325ed01;hp=ac9ab74aeb10470f01416d87cb9641506207952e;hb=b606e1a567586b0498a0632142904ad1a79d6e44;hpb=278a9487e60fdcf3e96236580f9542c218a8c1f1 diff --git a/client/GoodFETMSP430.py b/client/GoodFETMSP430.py index ac9ab74..e7cc368 100644 --- a/client/GoodFETMSP430.py +++ b/client/GoodFETMSP430.py @@ -10,8 +10,12 @@ import sys, time, string, cStringIO, struct, glob, serial, os; from GoodFET import GoodFET; class GoodFETMSP430(GoodFET): + #Set APP to be MSP430APP or MSP430X2APP, the latter being preferred. + + #0x16 for class, 0x17 for SBW, 0x11 by default APP=0x11; - MSP430APP=0x11; #Changed by inheritors. + MSP430APP=0x11; + CoreID=0; DeviceID=0; JTAGID=0; @@ -25,12 +29,12 @@ class GoodFETMSP430(GoodFET): self.writecmd(self.MSP430APP,0x21,0,self.data); def MSP430coreid(self): - """Get the Core ID.""" + """Get the Core ID. (MSP430X2 only?)""" self.writecmd(self.MSP430APP,0xF0); CoreID=ord(self.data[0])+(ord(self.data[1])<<8); return CoreID; def MSP430deviceid(self): - """Get the Device ID.""" + """Get the Device ID. (MSP430X2 only?)""" self.writecmd(self.MSP430APP,0xF1); DeviceID=( ord(self.data[0])+(ord(self.data[1])<<8)+ @@ -48,7 +52,7 @@ class GoodFETMSP430(GoodFET): (adr&0xff0000)>>16,(adr&0xff000000)>>24, ]; self.writecmd(self.MSP430APP,0x02,4,self.data); - + #print "Got %i bytes peeking 0x%04x." % (len(self.data),adr); return ord(self.data[0])+(ord(self.data[1])<<8); def MSP430peekblock(self,adr): """Grab a few block from an SPI Flash ROM. Block size is unknown"""