[Top][All Lists]

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

Re: [avr-gcc-list] AVR DataFlash

From: David Gay
Subject: Re: [avr-gcc-list] AVR DataFlash
Date: Tue, 21 Feb 2006 15:01:40 -0800

On 2/17/06, Rolf Ebert <address@hidden> wrote:
> > I've been gathering some information on AVR butterfly's dataflash
> > (AT45DB041B). It looks like there are several read and write commands:
> > main memory page read/write, buffer read/write, etc. Has anyone tried to
> > use these commands before? Are there any examples available online? How
> > can I write a C code to read from the buffers? Or write data to the main
> > memory? One more question: Can I determine how expensive dataflash
> > read/write operations? Thank you for your help!
> Get the data sheet from Atmel and then have a look at the Butterfly's
> sample code itself, mainly dataflash.h.  Essentially you have to first
> write your data into one of the RAM buffers and then you can copy the
> buffer to a given page.  Reading is the other way round, you first copy a
> page into the RAM buffer and then you can read from the buffer.  The
> sample Butterfly code does a continuous stream reading without using the
> RAM buffer.
> Sorry, my code isn't C, but Ada.

You could also look at the code I wrote for TinyOS. It's in nesC, a C
dialect, but it shouldn't be hard to extract any bits you're
interested in. Browse through the CVS repository for TinyOS at
sf.net/projects/tinyos, and look for
tinyos-1.x/tos/platform/mica/PageEEPROMM.nc., i.e.,

One version of the low-level routines to access the flash on our
particular platform are found in the HPLFlashM.nc file in the same

David Gay

reply via email to

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