Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] firmware update via wireless

2006-08-31 by Dennis Clark

Let me give you some pointers.  Having done this before on PICs.
1) Your bootloader and basic network control need to be in write 
protected memory and need to be the first thing that is touched upon 
reset.

2) Set a flag in non-volatile memory denoting whether a good or bad 
firmware image is in FLASH.  If good, proceed to code, if bad, go into 
code download mode.

3) CRC your download.  If it is a very long one, CRC each packet and use 
an ACK/NAK to re-transmit.  If the download is only 30K or so, just CRC 
the entire download and check the CRC at the end of the transmission.

4) ACK/NAK each packet to signal reception.  Kill your downloader push 
code so that it can set up for a new transmission if a NAK occurs.

The above is a reasonably paranoid protocol, and it works quite well. 
For TRUE paranoia, you can sequentialize the packets so that you can 
re-transmit missed packets.

have fun,
DLC

mago Umandam wrote:
> awww... you guys scared me huh
> im thinking it may cause problem in the future...
> i'll need a senior engineer beside me to study this...
> thanks you guys for comments and suggestions
> 
> mago
> 
> 
> David VanHorn <microbrix@gmail.com> wrote:                                  On 8/31/06, Dennis Clark <dlc@frii.com> wrote:
>  >
>  > You'd better use a very robust error detection/correction packet scheme.
>  > Wireless is inherently unreliable.  Also, you'll need to be sure that
>  > your device can deal with a corrupted download and still be able to be
>  > put into "update" mode.  There is no reason it can't be done, but I
>  > recommend a very paranoid protocol to handle it!
>  
>  I was about to suggest this, but you beat me to it.
>  
>  In general, the part that does the firmware update should be in the
>  bootloader section, and protected so that it can't be erased.  The general
>  philosophy is that no matter what, the part that does the firmware load (and
>  radio management in your case) can't be vulnerable.
>  
>  [Non-text portions of this message have been removed]
>  
>  
>      
>                        
> 
>  		
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 

-- 
---------------------------------------
Dennis Clark    TTT Enterprises
---------------------------------------

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.