Where in the flash map can I safely store configuration info
Posted: Wed Nov 30, 2016 4:37 pm
Not sure if this is the right place for this but if not let know and I will try another area.
I have a need to be able to store configuration data in flash. I also have a need to be able to do updates via a web server (i.e.ESPhttpUpdate.update()) . I have written code to manage the flash which works and finally got the OTA update to work. However, the update seems to be overwriting at least part of the area where my configuration data is stored.
I read another post where the 0x80 - 4 sector was used. That is near the top of the 512 K boundary and I expect it would get overwritten. However in the esp12e we are using there is 4 Meg of flash, where the top 3 meg is used by SPIFFS. I don't need the SPIFFS and my code is below the 512K boundary. I tried setting the flash area at the 4 Meg - 4 sector location but it seems to be getting overwritten when I do an OTA update using ESPhttpUpdate.update(). Is there a place where I can locate the config data that will not be overwritten? (I have allocated 512 bytes because that is the size of the RTC user mem which I use for dynamic storage of the config data).
Thanks for your help.
I have a need to be able to store configuration data in flash. I also have a need to be able to do updates via a web server (i.e.ESPhttpUpdate.update()) . I have written code to manage the flash which works and finally got the OTA update to work. However, the update seems to be overwriting at least part of the area where my configuration data is stored.
I read another post where the 0x80 - 4 sector was used. That is near the top of the 512 K boundary and I expect it would get overwritten. However in the esp12e we are using there is 4 Meg of flash, where the top 3 meg is used by SPIFFS. I don't need the SPIFFS and my code is below the 512K boundary. I tried setting the flash area at the 4 Meg - 4 sector location but it seems to be getting overwritten when I do an OTA update using ESPhttpUpdate.update(). Is there a place where I can locate the config data that will not be overwritten? (I have allocated 512 bytes because that is the size of the RTC user mem which I use for dynamic storage of the config data).
Thanks for your help.