Intermittent problem - SPIFFS becomes read-only on Wemos?
Posted: Fri Oct 26, 2018 10:50 am
Hi,
When writing to a random access binary file held on SPIFFS, the file occasionally becomes 'read-only' in that any attempt to write data to it instead writes an equivalent number of zeros (i.e write record and read it straight back in - it's full of zeros). Reading from the file functions correctly. I have tried this on 5 seperate Wemos boards (D1 R1, R2 and mini) with similar results.
Has anyone seen any similar behaviour or can anyone give me a steer as to what circumstances might cause either the SPIFFS filesystem or the underlying flash chip to become 'read only'?
I'm unable to provide reliable Minimal Complete Reproducible Example (yet) as this seems to be an intermittent problem and all my attempts at an MCRE work correctly! Still working on it.
When writing to a random access binary file held on SPIFFS, the file occasionally becomes 'read-only' in that any attempt to write data to it instead writes an equivalent number of zeros (i.e write record and read it straight back in - it's full of zeros). Reading from the file functions correctly. I have tried this on 5 seperate Wemos boards (D1 R1, R2 and mini) with similar results.
Has anyone seen any similar behaviour or can anyone give me a steer as to what circumstances might cause either the SPIFFS filesystem or the underlying flash chip to become 'read only'?
I'm unable to provide reliable Minimal Complete Reproducible Example (yet) as this seems to be an intermittent problem and all my attempts at an MCRE work correctly! Still working on it.