class GoodFETAVR(GoodFET):
AVRAPP=0x32;
+ APP=AVRAPP;
AVRVendors={0x1E: "Atmel",
0x00: "Locked",
};
};
def setup(self):
- """Move the FET into the SPI application."""
+ """Move the FET into the AVR application."""
self.writecmd(self.AVRAPP,0x10,0,self.data); #SPI/SETUP
def trans(self,data):
def start(self):
"""Start the connection."""
self.writecmd(self.AVRAPP,0x20,0,None);
+ def forcestart(self):
+ """Forcibly start a connection."""
+
+ for i in range(0x880,0xfff):
+ #self.glitchVoltages(0x880, i);
+ self.start();
+ bits=self.lockbits();
+ print "At %04x, Lockbits: %02x" % (i,bits);
+ if(bits==0xFF): return;
def erase(self):
"""Erase the target chip."""
self.writecmd(self.AVRAPP,0xF0,0,None);
"""Read the target's lockbits."""
self.writecmd(self.AVRAPP,0x82,0,None);
return ord(self.data[0]);
+ def setlockbits(self,bits=0x00):
+ """Read the target's lockbits."""
+ self.writecmd(self.AVRAPP,0x92,1,[bits]);
+ return self.lockbits();
+
def eeprompeek(self, adr):
"""Read a byte of the target's EEPROM."""
self.writecmd(self.AVRAPP,0x81 ,2,