Compare commits

...

1 Commits

Author SHA1 Message Date
Grigori Goronzy
05d0ff0576 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.
2016-05-26 12:53:02 +02:00

View File

@ -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")