Commit e1ac2ab1 authored by Qiang Du's avatar Qiang Du

Fix flash read command

parent 8d7f2984
......@@ -99,7 +99,6 @@ class FlashM25P:
status = 0
retry = 3
while (status != 0x2):
logging.debug('Flash not ready, status: 0x%x' % status)
if (retry <= 0):
raise IOError('Error writing, status not vaild: 0x%x'% status)
logging.debug('retry = %d' % retry)
......@@ -157,6 +156,7 @@ class FlashM25P:
# send address in reverse order
self.spi_transfer(3,1,self.rev_addr(addr))
self.spi_transfer(1,1,0)
n = nrbytes
# Read bytes in groups of three
while (n/3>0):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment