writing to flash without using SPIFFS
Posted: Mon Nov 21, 2016 8:12 am
I'm using a NodeMCU and the arduino IDE and want to write data to flash...
I assume using SPIFFS with a file system etc means that it's not a quick to write data as writing to the flash directly?
I want to be able to write data to flash (up to 200KB as 1 "file") and read it back later - it's never going to leave the device so it doesn't need to be a specific file format.
If I use ESP.flashRead / ESP.flashWrite and ESP.flashSectorErase and handle byte alignment myself, can I assume it will be quicker than using SPIFFS? If so, how do I determine where in the flash is safe to write? How do I swap flash banks if that's necessary and do I need to select a module configuration that doesn't include a reserved area for SPIFFS?
I'd really appreciate any guidance...
I assume using SPIFFS with a file system etc means that it's not a quick to write data as writing to the flash directly?
I want to be able to write data to flash (up to 200KB as 1 "file") and read it back later - it's never going to leave the device so it doesn't need to be a specific file format.
If I use ESP.flashRead / ESP.flashWrite and ESP.flashSectorErase and handle byte alignment myself, can I assume it will be quicker than using SPIFFS? If so, how do I determine where in the flash is safe to write? How do I swap flash banks if that's necessary and do I need to select a module configuration that doesn't include a reserved area for SPIFFS?
I'd really appreciate any guidance...