Skip to content

Commit

Permalink
Correct -z flag wrong variable, ignore errors on controller reset
Browse files Browse the repository at this point in the history
  • Loading branch information
KerJoe authored Dec 19, 2022
1 parent 7d71cce commit 6e13308
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions rtdmultiprog.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ def enter_isp():

def reboot_controller():
""" Disable In-System Programming mode, Restart internal MCU """
write_reg(0xEE, 0x02)
write_reg(0x6F, 0x01)
try:
write_reg(0xEE, 0x02)
#write_reg(0x6F, 0x00)
except ConnectionError:
pass

def isp_custom_instruction(cmd_type, cmd_code, read_n, write_n, write_value):
if write_n == 1:
Expand Down Expand Up @@ -347,7 +350,7 @@ def interface_get_help():

if args.read_file:
if args.read_size:
READ_SIZE = int(args.readSize, 0)
READ_SIZE = int(args.read_size, 0)
else:
print(f"WARNING: '-z READ_SIZE' not set, default read amount of {READ_SIZE // 1024} KiB used")
if not read_flash_file(args.read_file, lambda s, e, c: progress_bar(c/(e-s))):
Expand Down

0 comments on commit 6e13308

Please sign in to comment.