IAR CRC Calculation for EWARM
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 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.
" '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