Limit of 100 bytes for EEPROM emulation

Is there any way to increase the amount of emulated EEPROM on a Spark Core? 100 bytes is too small for my needs. In it much less than the amount of EEPROM on Arduino. I’d like to have at least 1K bytes available.

What is the amount of EEPROM (real or emulated) on the upcoming Photon? Would Photon solve my problem?

There is an additional 1.5MB of external flash on the core that you can use.

Search for the flasheee library for more information. :wink:

1 Like

https://github.com/m-mcgowan/spark-flashee-eeprom :wink:

Thank you all for your help. This is exactly what I need for the Core. Does anyone know how extended EEPROM will work on the Photon and what the limits will be on this new device?

The Photon does not have 1.5MB of external Flash like the Core, but it does have 1MB of internal Flash. There should be more than 100 bytes available, and should be at least 100 available for the internal EEPROM library. However if you need gobs of storage you might be better off adding an external SPI FRAM chip, or an SD card. Will have to see what @mdma thinks about this as well :smile:

1 Like

On the photon, there will be at least 8KB emulated eeprom, with a maximum of 16KB.

For more local storage, a SD card, as found on the brewpi shield might be a good way to go, or a SPI flash/FRAM chip. I will glady extend the flashee library to handle other storage devices as required.

2 Likes

Thanks BDub and mdma for all of this great information. The 8 KB on Photon will be more than enough for my needs. I only need about 1 or 2 KB, as I need non-volatile storage of sensor registration information supplied by a user that includes descriptive text strings for about 10 - 20 sensor devices. A descriptive text string will be on the order of 20 - 30 characters, meaning that 100 bytes won’t come close but 1K bytes (as on an Arduino Uno) is probably sufficient. On Core I can use the minimum of 4KB of Flash (with the flashee library) and the 8KB on Photon is then twice as good!

Just an update: I am using flash-eeprom to provide 4KB of emulated eeprom in the Core. It works great, and I like the string store function. Even though the native EEPROM library will provide 8KB on Photon, I would really appreciate the flash-eeprom ibrary being ported over to Photon so my code doesn’t need to change between these two module types. Would be MUCH appreciated.

2 Likes

Good idea! While there aren’t enough pages on the photon to properly support flashee, I can implement the FlashDevice class in terms of the built-in EEPROM functionality so that the same code can work unchanged with either the internal EEPROM or flashee-eeprom on external storage (which is present on the P1.)

Issue tracked here. https://github.com/m-mcgowan/spark-flashee-eeprom/issues/10

2 Likes

I'm confused by this statement. Will the P0 have flash or eeprom for it's 1MB storage? I assumed that the 1MB was on the STM32 chip as flash. Also I understand the P1 will have an additional 1MB of storage, will that be EEPROM or will that be flash also?

I know your class treats flash as EEPROM, just wanting to get a clarification.

Perhaps I should have said:

There's no real eeprom on the STM32, it's all flash. So emulated eeprom is what's on offer.

1 Like

@mdma That sounds really great, but the docs say there will only be 2048 bytes available, or 2K? From Carsten4207's post here, it sounds like there really is only 2048 bytes? Can someone confirm the amount that will be available on the Photon?

P.S. 2K is enough for me--I'm celebrating that I can store 200× more on a Photon than on a Core w/out the FLASHEE library! Just trying to clarify the number.

It’s 2K. This was written before the Photon memory map was finalized. Plus the eeprom emulation must have a certain amount of reserved space to avoid excessive wear to the flash pages. So that’s why it’s 2K of emulated memory (which is using 32K of actual flash.)

OK. I won’t complain. Particle is giving us such a great platform already. If we want 2GB of space, well, just get an SD card :stuck_out_tongue_winking_eye: