Skip to content

Commit

Permalink
Merge pull request #444 from dolfje/patch-1
Browse files Browse the repository at this point in the history
cloader.read_flash is unreliable
  • Loading branch information
ToveRumar committed Jun 27, 2024
2 parents d1a91c6 + 6d410bb commit 37624e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cflib/bootloader/cloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def read_flash(self, addr=0xFF, page=0x00):
pk = None
retry_counter = 5
while ((not pk or pk.header != 0xFF or
struct.unpack('<BB', pk.data[0:2]) != (addr, 0x1C)) and
struct.unpack('<BBHH', pk.data[0:6]) != (addr, 0x1C, page, (i * 25))) and
retry_counter >= 0):
pk = CRTPPacket()
pk.set_header(0xFF, 0xFF)
Expand Down

0 comments on commit 37624e0

Please sign in to comment.