Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Re; CRC using IAR compiler

2010-05-13 by David Kelly

On May 12, 2010, at 10:09 AM, Philippe Habib wrote:

> Thanks,
> 
> I got that far too.  I can get the CRC placed into the file, and I can  
> read it.  My problem is I can't generate one that matches the one in  
> the file.  I tried several methods and while they agree with each  
> other, none agree with the IAR one.
> 
> I've seen the same problem raised in the AVR forum, but the people  
> who've solved it never post the resolution.
> 
> I'll have to back off and take a fresh look.


I'm tuning in late but if you are having problems replicating the result of IAR's CRC calculation then perhaps one should ask IAR how the value is calculated?

There is a lot of debate as to how a CRC should be calculated. In the past when I studied this issue there was one school of thought that the last bits fed to the CRC generator were weaker than all the other bits previously fed. Their solution was to "close" the calculation by always pushing 0xffff (or some such known value) into the CRC checksum as the very last values added.

--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.