EEPROM Emulation on AT91SAM7S

Guest #1172940
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!
#1172941
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

A question of your own? This thread is over 19 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.