EEPROM / FLASH access library

Hmm. Perhaps there's three threads now? :stuck_out_tongue: Can you point me to the one you mean? I can't find any talk of FRAM in the 'other thread' that I thought you meant. Cheers.

MicroSD shield thread -

Data sheet:

http://www.fujitsu.com/downloads/MICRO/fsa/pdf/products/memory/fram/MB85RS64A-DS501-00009-0v01-E.pdf

Sorry foŕ hijacking this thread!

1 Like

I now have my jtag shield so I will start working on this again. First task is to see if I can unbrick my bricked spark by copying over the eeprom contents from a working unit. Hopefully all I need to do then is change the mac address.

2 Likes

I’ve coded an eeprom emulation library that uses the external flash for storage. There are 3 main implementations, offering a tradeoff in storage density/endurance, with the best endurance 3 orders of magnitude better than manually writing and erasing flash memory.

Unit tests in gcc and on-device integration tests are provided. Also a circular buffer.

Look out for flashee-eeprom in the Online IDE, or build locally by grabbing the sources.

1 Like

It’s possible to add the FAT filesystem from the SD-card library so that small filesystem can be hosted in the external flash, without needing an external SD-card. Does that sound like a good plan?

2 Likes

Im not very familiar with most of this topic, but I ask whats the simplest way to port arduino code to spark

#include EEPROM.h
 value = EEPROM.read(0);

The “<” and “>” get removed for some reason

First of all, if you want to display code, select the code and click the button that looks like </> in the tool bar. Then special symbols won’t disappear.

Second, the Spark firmware by default includes EEPROM emulation capabilities, so you don’t need to have the #include EEPROM.h statement to access the EEPROM commands. So in that regard it’s relatively simple to transfer code from the arduino. One thing to be aware of is that by default the Spark firmware only give access to 100 bytes of “EEPROM”, so if your code tries to access an address outside of this, you will most likely have issues.

1 Like