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