Re: Crc16 on power failure




Mr. C wrote:
On Thu, 18 Jan 2007 17:54:38 +0100, "Ignacio G.T."
<igtorque.remove@xxxxxxxxxxxxxxx> wrote:
I'd suggest using a simple checksum (perhaps complemented), instead of a
CRC. Usually, a checksum is faster to calculate than a CRC by software.

True, they are faster, but they are not nearly as good at detecting
errors. 8-bit checksum, XOR-ing, or whatever can allow for a 1/256
chance of not detecting an error. A 16-bit checksum is better than an
8-bit, but not nearly as good at detecting single bit errors as a
CRC-16. Jack Crenshaw states that a 16-bit CRC will detect:

It's clear CRC are much better at burst error detection. But since
both methods contain the same number of possible check digits they have
the same probability of any given random sequence matching a given
check (1 in 64K for a 16bit check) it follows that a simple check
should be better in non-burst conditions. It only remains to determine
what kind of errors your memory system can give you ;)

As well as a CRC and check sum you can also consider a Fletcher
checksum. Also for storing backup values of operating parameters
coonsider running an EEC on each parameter instead of a block check.
National had an app note on a straightforward one I can look up. The
EEC has the advantage of being per item and so likely faster if you
only change an item or two, it will take up more room though. You
could combine it with a simple checksum over a block to give a dual
layer check.

Robert

.



Relevant Pages

  • Re: Crc16 on power failure
    ... a checksum is faster to calculate than a CRC by software. ... True, they are faster, but they are not nearly as good at detecting ... You might be able to do as well in C as you can in assembly language. ...
    (comp.arch.embedded)
  • Re: CRC versus CheckSum
    ... I have a situation where I have a byte in which to place either a checksum ... Our packets cannot have bytes in a packet swapped in order (the transport ... jsut as good as the CRC. ... Neither detect all errors (there are after all the same number of states for the sum in either case). ...
    (comp.arch.embedded)
  • Re: Opinions on 16-bit checksums.
    ... it's no longer a checksum, ... >> cancel themselves out, but a CRC would. ... I've witnessed no failures or oddities. ... I don't think it can be assumed that ROMs ...
    (comp.arch.embedded)
  • Re: Opinions on 16-bit checksums.
    ... >> possibly result in an unchanged CRC checksum. ... > There are two big reasons CRCs are used in serial communications: ... algorithms that consider the order of the data as well as the value - a ...
    (comp.arch.embedded)
  • Re: Opinions on 16-bit checksums.
    ... out there besides CRC and "add up the bytes". ... There are other checksum ... I don't think it can be assumed that ROMs ... ROMs do have the same error characteristics as a serial data ...
    (comp.arch.embedded)