avr-gcc-list
[Top][All Lists]
Advanced

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

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


From: Marko Panger
Subject: Re: [avr-gcc-list] Const array in bootloader section
Date: Thu, 09 Oct 2003 16:56:00 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313

My board will interface to a system which is already developed and installed so my communication protocol is somewhat already defined and I can't implement my (new) error detection scheme.

I must use a 8 bit CRC checking scheme with the "CRC polynom" defined by
the other side of the system. A solution was to calculate the CRC by using a table, but I am unable to place the table (pre-defined constant array) in the bootloader section.

Any other idea how to put a defined array in the bootloader section ?

Anyway thanks !

marko

Reza Naima wrote:
somewhat delayed, but check out http://www.reza.net/avr/ -- i've already
gotten a uart based bootloader written -- and it supports a simple
checksum as well.

-r

On Fri, Sep 26, 2003 at 12:47:14PM +0200, Marek Michalkiewicz sent me this...

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,
Marek

_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list


_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list





reply via email to

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