From 1ac3683207b20f2b824db50249e5f554b115a77a Mon Sep 17 00:00:00 2001 From: Dan White Date: Sat, 2 Jun 2012 21:13:39 -0500 Subject: [PATCH] test new flash write/readback, good --- python-lib/mpsse-test.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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:]) ############################################################################## -- 2.25.1