I am having a similar problem with the flashee library. I have a function that saves a value to the flash eeprom via a function exposed to the cloud api.
This function only writes to the flash eeprom when I go to the spark api URL and enter the correct value.
The core immediately reads back the contents of the memory address and the value is correct.
When the spark core starts up the first thing it does is read that value written to the flash eeprom.
From there I can power cycle the core several times and the value persists, but maybe 1 out of 10 times the value is randomized or full of FF. If I power cycle the core a few more times the value comes back on it’s own.
Is this possibly an issue related to wear leveling?