Page 1 of 1

Thread Safety of NVS on one core and SPIFFS on another

Posted: Sun Oct 29, 2023 8:33 pm
by GeorgeWBush
I am currently programming a NimBLE based BLE datalogger. NimBLE utilizes the NVS api to store data into the NVS partition of my flash. This is a seperated partition to my SPIFFS (I believe technically it is LittleFS at this point?) filesystem.

NimBLE is run on core 2, while my main application, which uses SPIFFS, runs solely on core 1.

My question is; Could the fact, that I am using NVS on another thread and therefore the possibility of concurrent read/write calls to the flash cause any issues? Or are the thread safety mechanisms between the two filesystems?

Re: Thread Safety of NVS on one core and SPIFFS on another

Posted: Mon Oct 30, 2023 1:20 am
by ESP_Sprite
NVS doesn't have an underlying filesystem; it's its own journaling file system type storage. The flash block drivers are re-entrant, so you shouldn't have to worry about multiple tasks doing things to the flash.