summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2010-02-20 15:38:53 +0100
committerMichael Buesch <mb@bu3sch.de>2010-02-20 15:38:53 +0100
commit4bc8071b78d159d725631f41c84d7e5d52693452 (patch)
treecef4ceed98733f57218161f2d54ca8cd74bad05c
parentd8a603d67657bc93d5e066b33088e1a3ea6295f0 (diff)
downloadtoprammer-4bc8071b78d159d725631f41c84d7e5d52693452.tar.xz
toprammer-4bc8071b78d159d725631f41c84d7e5d52693452.zip
Move check. Fix typo.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
-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