2012-07-17 07:38 AM
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-crc2012-07-17 07:49 AM
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.