stc12+: drop checksum verification for flashing
It's not needed on STC12 and up. All transfers are error checked with parity and a 16-bit modular sum already. STC15 dropped the verification checksum on the protocol level, it's not sent with the write status packet, which is a testament to it being useless. Some parts store the UID in the last bytes of flash memory and this verification actually caused incorrect verification failures because of that. Fixes grigorig/stcgal#15.
This commit is contained in:
parent
8ad77586d4
commit
05d0ff0576
@ -891,8 +891,6 @@ class Stc12BaseProtocol(StcBaseProtocol):
|
|||||||
response = self.read_packet()
|
response = self.read_packet()
|
||||||
if response[0] != 0x00:
|
if response[0] != 0x00:
|
||||||
raise StcProtocolException("incorrect magic in write packet")
|
raise StcProtocolException("incorrect magic in write packet")
|
||||||
elif response[1] != csum:
|
|
||||||
raise StcProtocolException("verification checksum mismatch")
|
|
||||||
print(".", end="")
|
print(".", end="")
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
print(" done")
|
print(" done")
|
||||||
|
Loading…
Reference in New Issue
Block a user