IAR CRC Calculation for EWARM

Started by Mike Nelson January 11, 2006
Greetings:

The example given by IAR only does CRC16 (0x11021)
with no complement and MSB first. For any reasonable
span of code, one should really use CRC32, as it is
less likely by far to alias.

Here is a complete project for generating and checking
the CRC16.

http://supp.iar.com/FilesPublic/SUPPORT/002404/Checksum_ARM_430A.zip

Regards:
Mike Nelson
http://MichaelTNelson.com

__________________________________________________




An Engineer's Guide to the LPC2100 Series

At 06:45 PM 1/10/06 -0800, Mike Nelson wrote:
>The example given by IAR only does CRC16 (0x11021)
>with no complement and MSB first. For any reasonable
>span of code, one should really use CRC32, as it is
>less likely by far to alias.

Well any 16 bit check has approx 256 times fewer aliases than an 8 bit
checksum. However a 16 bit CRC and a 16 bit arithmetic checksum have
exactly the same number of aliases. The big advantage of the CRC is its
sensitivity to burst errors. Whether that is an advantage for flash is, I
think, an open question. At least I haven't seen anything that shows the
error distribution in flash. And for uploads I could argue either way
depending on the character of the changes.

Robert

" 'Freedom' has no meaning of itself. There are always restrictions, be
they legal, genetic, or physical. If you don't believe me, try to chew a
radio signal. " -- Kelvin Throop, III
http://www.aeolusdevelopment.com/