2022-01-29 05:11 AM
Hi, @Community member @TDK
I am working on the STM32F4 to implement the FLASH MEMORY CHECKSUM SELF CHECKING to determine if data and program in FLASH have been corrupted and if so not to run the user program.
Any information regarding implementation for STM32F4/STM32F really appriciated.
Thanks,
Zafar
2022-01-29 07:13 AM
Calculate the checksum, compare against the known value, and take the appropriate action.
2022-01-29 07:31 AM
I think this is a topic area I've covered more than once.
Perhaps use the STM32F4 hardware CRC32 implementation, and a post-link processing of the .ELF or .BIN to insert the size and checksum/crc into the image destined to be burned onto the part.
More advanced methods would be to use a hash like SHA256 or MD5, and elliptic curve signing via SEC-P192R1 or something similar.