Photon EEPROM + User storage area


I know we have the EEPROM on the Photon which has 2048 bytes which user code can use to store data.

Is there any additional storage that we can use?

@Carsten4207, the title is a bit misleading. You are asking about where users can store “persistent” data, correct?

The Photon emulates eeprom using a portion of flash (larger than 2048 bytes to do wear-levelling). There will eventually be a way to specify variables to be stored in a 4KB portion of SRAM which is maintained when power is off and a Vbat voltage is present. That is it for the Photon. The P1 module also adds an external 1MB SPI flash chip like the Core.

How much “storage” were you looking for? :smile:

My apologizes for the confusing name. Looks like @kennethlimcp fixed it for me already!

I am looking at storing one to two thousand 5 digit numbers. Then also need to be able to store event data (timestamp + 5 digit number).

I am looking at using the standard Photon for now, so I might need to add an external storage chip.

@Carsten4207, how much event data do you need? I ask because you could use and SD card or a FRAM for example which is fast like RAM but retains like flash. Depending on how often you read/write, you could also go with an 1MB SPI eeprom like the one used on the Core. I am sure @mdma flashee library could be adapted to work with the Photon.

1 Like

I think a couple hundred events stored would be fine.

The FRAM looks promising.

@Carsten4207, the nice thing about FRAM is it basically never wears out. Fujitsu also makes a 32Kx8 FRAM that works with SPI which much faster than I2C, if you need that.

The library for either is simple and performance is decent, especially with sequential read or writes. It is also very happy at 3.3v and draws 220uA while operating and 27uA in standby (I2C version).


Speed isn’t an issue. I’ll get a FRAM and see how that works out. Thanks for the advise!

1 Like