2017-01-18 11:47 PM
Hi,
I'm developing a customized SPI Bootloader code. I plan to use CRC32 in verifying the programmed application code. I used this link as a reference for my CRC32 calculator C-code function in the Bootloader:
https://github.com/joeferner/stm32-spi-bootloader/blob/master/src/spi-bootloader.c
http://www.ipgp.fr/~tuchais/earthworm/v6.3/src/data_sources/naqs2ew/crc32.c
But, the values that I get when I use that function isn't the same to the ones I get when I load the hex or bin file to ST-Link. ST-Link is showing different CRC32 values.
On the other hand, when I use online tools such as:
http://www.fileformat.info/tool/hash.htm
http://esrg.sourceforge.net/utils_win_up/md5sum/
I am getting the same CRC32 values with my C-code function.
Is ST-LINK using a different algorithm (but in the user manual, it says that it's using CRC32)?
Any insights is appreciated!
Thanks,
#stlink #crc32 #stm32Solved! Go to Solution.
2017-01-23 3:28 AM
Hello
Solomo.Mary_Raullett
,Indeed, ST-LINK Utility is using a different algorithm than CRC32 (to use the algo as STVP too)
The algorithm used in ST-LINK Utility is a simple add operation byte by byte.
Moreover, y
ou are right about the CRC32 algorithm is mentioned in the User Manual as it is supported at first, and then we’ve c
hanged it to much with STVP’s algorithm.
Therefore
, t
he User Manual will be updatedin coming version to add the missed information.
Hope this helps you and thank you for your contribution.
Best Regards
Imen
2017-01-23 3:28 AM
Hello
Solomo.Mary_Raullett
,Indeed, ST-LINK Utility is using a different algorithm than CRC32 (to use the algo as STVP too)
The algorithm used in ST-LINK Utility is a simple add operation byte by byte.
Moreover, y
ou are right about the CRC32 algorithm is mentioned in the User Manual as it is supported at first, and then we’ve c
hanged it to much with STVP’s algorithm.
Therefore
, t
he User Manual will be updatedin coming version to add the missed information.
Hope this helps you and thank you for your contribution.
Best Regards
Imen
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.