Pages: [1]   Go Down
Author Topic: EEPROM  (Read 7368 times)
0 Members and 1 Guest are viewing this topic.
São Paulo / Brasil
Offline Offline
Full Member
***
Karma: 1
Posts: 182
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello!

The DUE has a EEPROM ?

What is the capacity of it?

If not, is there another memory to replace it?

The library EEPROM.h is still valid?

Best regards.

Fernando Garcia

Logged

Conheça uma nova opção Open Source para controlar seu aquário: www.ferduino.com

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8525
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No EEPROM but there is the ability with ARMs to do IAP (In Application Programming) which writes into flash. This could be used for non-volatile storage but someone will have to write the code. Maybe the Arduino guys have converted the EEPROM library to do this.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8525
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Maybe the Arduino guys have converted the EEPROM library to do this.
It doesn't look like they have, I can't see any reference to a new EEPROM library and the old EEPROM.h file is the same as is always was. Maybe it's buried somewhere too obscure for my greps.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Forum Administrator
Milano, Italy
Offline Offline
Sr. Member
*****
Karma: 23
Posts: 292
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

actually there is no EEPROM support on the Due.

Graynomad, i see some difficult to develop a drop-in replacement of EEPROM lib because:
- To modify a single byte of flash memory you are forced to rewrite an entire "page", (that is 256 bytes).
- Before writing a "page" of flash memory you need to erase it, so you should read temporary in RAM the old flash content, start erase, apply the changes in ram and finally write the updated page.

Said that, the idea of using the Flash memory is not bad, and using the EEFC device of SAM3X should be not too hard to create a simple FLASH library, maybe with a slightly different API from EEPROM that take in consideration the limits above.

C
Logged

C.

Offline Offline
God Member
*****
Karma: 32
Posts: 507
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

IIRC the 16u2 has a small EEPROM, but to access that from the SAM3X it would need some special firmware and some means of communicating between the two.
Logged


North Queensland, Australia
Offline Offline
Edison Member
*
Karma: 70
Posts: 2171
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
- To modify a single byte of flash memory you are forced to rewrite an entire "page", (that is 256 bytes).
- Before writing a "page" of flash memory you need to erase it, so you should read temporary in RAM the old flash content, start erase, apply the changes in ram and finally write the updated page.

Hmm, one thing I'm considering for a project is a kind of pseudo virtual memory manager so I can safely use dynamic memory with only one allocation at app start. This 'IAP' could be some memory shortage fail safe when used for paging.

Can probably be used as a resource repository / registry. So many cool things I want to try.
Logged


São Paulo / Brasil
Offline Offline
Full Member
***
Karma: 1
Posts: 182
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello!
Thanks for the replies.
Just do not understand how important things like this were not implemented before the release of the product.

Best regards.
Fernando Garcia
Logged

Conheça uma nova opção Open Source para controlar seu aquário: www.ferduino.com

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just do not understand how important things like this were not implemented before the release of the product.

Because if everyone was satisfied before it released it never would. It's not difficult to write a EEPROM library that uses the flash. I'm already working on one.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 627
Posts: 34220
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Just do not understand how important things like this were not implemented before the release of the product.
Because the arduino is a development platform. However people seem to think that all trivial things should be presented as a library. There have been many years of unnecessary trivial function library development for the existing system, you can't expect that over night.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there!

I just got my brand new Arduino Due and realized the hard way that the EEPROM library is no longer supported.

Are there any news on EEPROM-equivalent functionality being supported?

Thanx in advance! smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there!

I just got my brand new Arduino Due and realized the hard way that the EEPROM library is no longer supported.

Are there any news on EEPROM-equivalent functionality being supported?

Thanx in advance! smiley

Better late than never? If you're willing to do a little hardware and software mod, you can utilize some EEPROM memory that is already on the board. See my post at http://forum.arduino.cc/index.php?topic=191298.0.

Enjoy!
Logged

Sweden
Offline Offline
Newbie
*
Karma: 3
Posts: 9
"Everything should be made as simple as possible, but no simpler"
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have created a library for Arduino Due at https://github.com/sebnil/DueFlashStorage
The library is made to be similar to the EEPROM library. It will save non-volatile data but the flash storage is reset every time you upload a new sketch to your Arduino. Except for that exception it works the same as EEPROM for the older Arduinos. Remove power or press the reset button, the data will still be there.

Basic use:
Code:
// write the value 123 to address 0
dueFlashStorage.write(0,123);

// read byte at address 0
byte b = dueFlashStorage.read(0);

I hope you will find it useful.
Logged


Offline Offline
Jr. Member
**
Karma: 0
Posts: 96
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Fantastic!

The in ability to save to a permanent  store on the DUE has always been its down fall in my eyes.

Ill be trying this out for a few projects soon smiley

Question, there's 512KB of Flash on the DUE.
Does this library use the final (1kb? 2KB? 5KB?) for use with the library or do you define this during initialising of the sketch?
Logged

Earth
Offline Offline
Sr. Member
****
Karma: 14
Posts: 330
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Keep in mind that using flash memory for your storage is NOT permanent! Devices like the Due are meant to be programmed lots of times. Every single time you write a new sketch (or update your current one) it will erase the entirety of flash space including your stored stuff. There is no way around this. Sebnil mentioned this but I thought it good to reiterate this point strongly as it totally kills the usefulness for many people. If it still works fine for you then, by all means, have at it. Otherwise you might need to add an I2C connected EEPROM chip or follow m3741's link.

Fantastic!

The in ability to save to a permanent  store on the DUE has always been its down fall in my eyes.

Ill be trying this out for a few projects soon smiley

Question, there's 512KB of Flash on the DUE.
Does this library use the final (1kb? 2KB? 5KB?) for use with the library or do you define this during initialising of the sketch?
Logged

0
Offline Offline
Shannon Member
****
Karma: 207
Posts: 12194
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

An I2C EEPROM chip on one of the I2C busses is one workaround.  Later
board revisions could incorporate one too?
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: