+ result = handleResponse(success, "ERROR: Unable to erase the flash volume")
+ if result: return True;
+
+ print 'Attempt the workaround for AT45DB...'
+ sreqpkt = FMReqPacket((FM_CMD_WRITE, imgNum, 0, 0, []))
+ sreqpkt.data = [0xFF] * DELUGE_IDENT_SIZE
+ sreqpkt.length = DELUGE_IDENT_SIZE
+ success = am.write(sreqpkt, FM_AMID)
+ result = handleResponse(success, "ERROR: Unable to erase the flash volume")
+ if not result: return False;
+ return sync(imgNum)