avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] [bug #37901] CRC-CCITT calculation incorrect


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] [bug #37901] CRC-CCITT calculation incorrect
Date: Tue, 11 Dec 2012 16:22:11 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

As Weddington, Eric wrote:

> Joerg, do you have any idea how much this function is actually used?

I know that it's at least been used in Atmel's IEEE 802.15.4 stack.
But sure, you never know how many people use them.  It's been there
since the early days of avr-libc, so you can guess someone wrote it
nine years ago since they had a need for it.

> I think it would be a good idea to support xmega users too.

They are already well supported by _crc_xmodem_update(), they just
need to be told. ;-)  As I wrote, it uses the very same polynomial,
just the opposite order:

CCITT:  0x8408 = 0b1000010000001000
Xmodem: 0x1021 = 0b0001000000100001

Btw., if I run the table-driven algorithm of RFC1171 on the string
"HELLO" (with an initial value of 0xffff), I also get 0x258a, which is
at least a proof that the function serves well for the purpose it
claims to serve ...
-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]