cancel
Showing results for 
Search instead for 
Did you mean: 

CRC check for FLASH

philipp2399
Associate II
Posted on February 07, 2008 at 03:16

CRC check for FLASH

4 REPLIES 4
philipp2399
Associate II
Posted on May 17, 2011 at 12:22

I want to check FLASH content after each startup using 32-bit CRC. This is easy to do, but I have to calculate CRC and add it to the linker output file before I download it to my STM32. I'm using Raisonance Ride 7.

Is there any smart way to add CRC or is there an alternative to detect corrupted data in FLASH memory?

lanchon
Associate II
Posted on May 17, 2011 at 12:22

don't know about ride7 but you could try integrating srecord into the build.

sjo
Associate II
Posted on May 17, 2011 at 12:22

If you are not sure what lanchon means by srecord:

http://srecord.sourceforge.net

This is an example to put the checksum at the end of the hex file

srec_cat in.hex -Intel -Little_Endian_CRC32 -max in.hex -Intel -Output out.hex

Cheers

sjo

philipp2399
Associate II
Posted on May 17, 2011 at 12:22

Thank you lanchon and sjo, I didn't know srecord.

I'll have to decide what information to add in the build (CRC, program version from version manager) and what information later during testing (serial number, hardware version, test report).