From 05d0ff05764f49f0903971f53735ac164fb44df6 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Thu, 26 May 2016 12:50:19 +0200 Subject: [PATCH] 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. --- stcgal/protocols.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/stcgal/protocols.py b/stcgal/protocols.py index 13f7e25..5668b64 100644 --- a/stcgal/protocols.py +++ b/stcgal/protocols.py @@ -891,8 +891,6 @@ class Stc12BaseProtocol(StcBaseProtocol): response = self.read_packet() if response[0] != 0x00: raise StcProtocolException("incorrect magic in write packet") - elif response[1] != csum: - raise StcProtocolException("verification checksum mismatch") print(".", end="") sys.stdout.flush() print(" done")