From 80055c2cdc1a5376c609e50f3ae0710f27146b15 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 22 Mar 2022 11:42:52 +1100 Subject: [PATCH] stm32/mboot/fwupdate.py: Simplify calculation of CRC32. Signed-off-by: Damien George --- ports/stm32/mboot/fwupdate.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ports/stm32/mboot/fwupdate.py b/ports/stm32/mboot/fwupdate.py index df1ff62846..3e25351370 100644 --- a/ports/stm32/mboot/fwupdate.py +++ b/ports/stm32/mboot/fwupdate.py @@ -75,12 +75,10 @@ def dfu_read(filename): return None hdr = f.read(16) - crc = crc32(hdr[:-4], crc) - hdr = struct.unpack("