From: Dan White Date: Sun, 3 Jun 2012 02:13:39 +0000 (-0500) Subject: test new flash write/readback, good X-Git-Tag: calibrations~58 X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=1ac3683207b20f2b824db50249e5f554b115a77a;p=430.git test new flash write/readback, good --- diff --git a/python-lib/mpsse-test.py b/python-lib/mpsse-test.py index 69934ce..4fb28c7 100755 --- a/python-lib/mpsse-test.py +++ b/python-lib/mpsse-test.py @@ -276,7 +276,7 @@ if 0: ############################################################################## # Flash testing # -if 0: +if 1: flash = usbio.M25PExx(spi0) flash.power(True) print flash.status() @@ -285,6 +285,9 @@ if 0: print 'data:', str2hex(flash.read(0x4000, 16)) flash.writeEnable(True) + #flash.eraseAll() + #while not flash.isReady(): + #print 'waiting for eraseAll() ...' from intelhex import IntelHex #h = IntelHex('../msp4th/hello-world.hex') @@ -310,7 +313,7 @@ if 0: while not flash.isReady(): print 'waiting...' -if 0: +if 1: nread = 0 c2 = '' while nread < len(code): @@ -321,8 +324,10 @@ if 0: nread += nr print len(code), len(c2) - #for i in range(len(code)): - #print i, code[i] == c2[i] + for i in range(len(code)): + print i, code[i] == c2[i] + print len(code), len(c2) + print str2hex(code[-4:]), str2hex(c2[-4:]) ##############################################################################