EmbDev.net

Forum: ARM programming with GCC/GNU tools EEPROM Emulation on AT91SAM7S


Author: Dim Alex (Guest)
Posted on:

Rate this post
0 useful
not useful
since the lack of EEPROM inside those MCUs I've to emulate it. Using an
external EE is not an option for me and my application.
I'm using the compiler from the WinARM tool chain and looking for an
example that can help me to do it in a good way. I couldn't find
anything in this forum, so far.
Thanks in advance!

Author: Jim Kaz (ancaritha)
Posted on:

Rate this post
0 useful
not useful
Dim Alex wrote:
> since the lack of EEPROM inside those MCUs I've to emulate it. Using an
> external EE is not an option for me and my application.
> I'm using the compiler from the WinARM tool chain and looking for an
> example that can help me to do it in a good way. I couldn't find
> anything in this forum, so far.
> Thanks in advance!


One possibility is to write to flash as if it were EEPROM.  Use the
couple pages of flash to store data.  If you go to the Atmel website you
should be able to find examples of writing to flash.  I believe they are
made using the IAR compiler, but the functions are short enough that
they are easy to translate into GCC, if any translation is even required
(I did it a while back so I don't remember, but I at least don't recall
having any difficulties doing it).

One important thing to remember if you use those examples, the flushPage
and AT91F_Flash_Status functions MUST be in RAM for it to work.  For
more information on putting functions in RAM, search the examples Martin
put together and look for ramfunc and fastrun.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.