[Top][All Lists]

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

Re: [avr-gcc-list] Const array in bootloader section

From: Marek Michalkiewicz
Subject: Re: [avr-gcc-list] Const array in bootloader section
Date: Fri, 26 Sep 2003 12:47:14 +0200
User-agent: Mutt/1.5.4i

On Fri, Sep 26, 2003 at 10:50:12AM +0200, Marko Panger AGB Lab wrote:
> I am implementing a bootloader which will receive data over a standard UART.
> Because the board will be mounted in a very noisy environment I would like
> to compute a CRC over the received data. The CRC is computed by using a CRC
> table.

Not exactly the answer to your question (how to put the CRC table
in the bootloader), but see <avr/crc16.h> for an efficient CRC-16
implementation.  See http://pdfserv.maxim-ic.com/en/an/app27.pdf
(pages 14-16) for some background how it works.

No big tables, and no slow one-bit-at-a-time loops, just 23 words
and cycles - should be fine for use in a bootloader.  This CRC is
compatible with the MODBUS RTU (http://www.modbus.org/) protocol.

Hope this helps,

reply via email to

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