stm32_mem.py: Add exception handler for better diagnosis, as erase on STM32F407 times out
This commit is contained in:
parent
5e71ea3f60
commit
06c2d52c59
|
@ -115,7 +115,11 @@ if __name__ == "__main__":
|
|||
while bin:
|
||||
print ("Programming memory at 0x%08X\r" % addr),
|
||||
stdout.flush()
|
||||
stm32_erase(dfudev, addr)
|
||||
try:
|
||||
stm32_erase(dfudev, addr)
|
||||
except:
|
||||
print "\nErase Timed out\n"
|
||||
break
|
||||
stm32_write(dfudev, bin[:1024])
|
||||
|
||||
bin = bin[1024:]
|
||||
|
|
Loading…
Reference in New Issue