summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chip_atmega8dip28.py14
-rwxr-xr-xtoprammer2
2 files changed, 8 insertions, 8 deletions
diff --git a/chip_atmega8dip28.py b/chip_atmega8dip28.py
index 1370a53..b6a5e51 100644
--- a/chip_atmega8dip28.py
+++ b/chip_atmega8dip28.py
@@ -76,13 +76,6 @@ class ATMega8DIP28(Chip):
self.__checkDUTPresence()
self.__initPins()
- self.top.cmdFlush(10)
- self.top.queueCommand("\x0E\x1F\x00\x00")
- self.top.delay(0.1)
- stat = self.top.cmdReadStatusReg32()
- if stat != 0xB9C80101:
- self.throwError("read: Unexpected status value 0x%08X" % stat)
-
self.progressMeterInit("Reading Flash", 256)
image = ""
for chunk in range(0, 256, 2):
@@ -334,6 +327,13 @@ class ATMega8DIP28(Chip):
else:
self.throwError(msg)
+ self.top.cmdFlush(10)
+ self.top.queueCommand("\x0E\x1F\x00\x00")
+ self.top.delay(0.1)
+ stat = self.top.cmdReadStatusReg32()
+ if stat != 0xB9C80101:
+ self.throwError("read: Unexpected status value 0x%08X" % stat)
+
def __readWordToStatusReg(self):
"""Read a data word from the DUT into the status register."""
self.__setReadMode(1)
diff --git a/toprammer b/toprammer
index a1cb9e5..5142dec 100755
--- a/toprammer
+++ b/toprammer
@@ -335,7 +335,7 @@ def main(argv):
elif opt_action == "write-fuse":
top.writeFuse(fileIn(opt_file, opt_informat))
elif opt_action == "read-lock":
- fileOut(opt_file, out_outformat, top.readLockbits())
+ fileOut(opt_file, opt_outformat, top.readLockbits())
elif opt_action == "write-lock":
top.writeLockbits(fileIn(opt_file, opt_informat))
else:
bues.ch cgit interface