cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F107 bootloader with CRC check of bin files

tamir23
Associate
Posted on July 17, 2012 at 16:38

Hi,

I've implement bootloader IAP with UART.

the code run without any problem and I have software upgrade support to my project.

I'm using IAR for ARM v6.40.2, I've tried to use the Linker configuration to generate bin files with CRC, and to check them in the bootloader using the CRC module of the STM32F107. unfortunately I'm not getting any match between the results...

there's a simple way add CRC support to the bin files and to verified them using STM32 CRC module?

thanks for your help!

#stm32f107-bootloader-crc
1 REPLY 1
Posted on July 17, 2012 at 16:49

Should be easy enough, the ST polynomial is awkward ie 32-bit big-endian.

A quick Google (IAR STM32 CRC) yields this.

http://supp.iar.com/Support/?note=64424&from=note+11927

On the STM32 side, you just need to enable the CRC clock, clear the register, then you should just be able to shovel the data to the register 32-bits (4 byte) at a time. If the CRC32 value is suitably inserted into the image the remainder across the image should be zero. A CRC acts as a long division.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..