[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fw: [avr-gcc-list] placing a variable in flash
From: |
Geoffrey Wossum |
Subject: |
Re: Fw: [avr-gcc-list] placing a variable in flash |
Date: |
Mon, 22 Nov 2004 14:47:09 -0600 |
User-agent: |
KMail/1.7.1 |
On Monday 22 November 2004 12:19 pm, E. Weddington wrote:
> 2. Ease of use.
> Reading and writing the EEPROM is easy especially for small values,
> because each byte can be erased. While reading Flash is easy, it is more
> complicated to write to Flash because you have to erase and write a
> block of data at a time, which means you need to flush the contents of a
> Flash block to a RAM buffer, erase the block and write the block with
> the new contents.
As I understand it, there is no way for normal application on an AVR to write
to program flash memory. Only code running in the bootloader area is allowed
to write to program flash. Is this correct? That's a huge ease of use
issue.
I got around this by having a special mode in my bootloader that copies a
block of data from E2 to a fixed area in flash. I use this for manufacturing
information I really don't want lost, like serial number and 802.15.4 MAC
address. This may seem like overkill, but in the past we've had problems
with the AVR's E2 "losing" data. I think this was only on the old ATmega103,
and that is fixed on parts like the ATmega128. Because of these old
problems, though, we're still a little shy about using the ATmega's E2 for
stuff we don't want to lose.
---
Geoffrey Wossum
Long Range Systems - http://www.pager.net
- Re: [avr-gcc-list] placing a variable in flash, (continued)
- Re: [avr-gcc-list] placing a variable in flash, E. Weddington, 2004/11/22
- RE: [avr-gcc-list] placing a variable in flash, Bernard Fouché, 2004/11/22
- Fw: [avr-gcc-list] placing a variable in flash, Royce & Sharal Pereira, 2004/11/22
- Re: Fw: [avr-gcc-list] placing a variable in flash, E. Weddington, 2004/11/22
- Re: Fw: [avr-gcc-list] placing a variable in flash, Sean Casey, 2004/11/22
- Re: Fw: [avr-gcc-list] placing a variable in flash, E. Weddington, 2004/11/22
- Message not available
- Re: Fw: [avr-gcc-list] placing a variable in flash, E. Weddington, 2004/11/22
- Re: Fw: [avr-gcc-list] placing a variable in flash, Ramkumar Rengaswamy, 2004/11/22
- Re: Fw: [avr-gcc-list] placing a variable in flash, E. Weddington, 2004/11/22
- Re: Fw: [avr-gcc-list] placing a variable in flash,
Geoffrey Wossum <=
- Re: Fw: [avr-gcc-list] placing a variable in flash, E. Weddington, 2004/11/22
- Re: Fw: [avr-gcc-list] placing a variable in flash, Geoffrey Wossum, 2004/11/22