Access to 2 (or more) flash data partition concurrently... Some restriction?
Posted: Mon Aug 02, 2021 1:25 pm
Hi everyone,
I'm using an old esp-idf version 3.1.7 (I know, it is quite old but fine trimmed for my purposes...) for a commercial product.
I partitioned the 8MB SPI flash of WROOM32 in order to have: 1 usual NVS partition to store parameters and 2 LittleFS partitions for various log data and configuration.
My question is: should I have to protect every access to flash partitions with a common shared mutex ?
So far, I used three mutexes, one of them for each partition but I'm not sure if this could be totally right...
Very rarely I got the Littlefs filesystems corrupted or inconsistent (with assert() generated internally) so I wonder if a single mutex could solve this issue...
Thank you for any hint!
rayf15
I'm using an old esp-idf version 3.1.7 (I know, it is quite old but fine trimmed for my purposes...) for a commercial product.
I partitioned the 8MB SPI flash of WROOM32 in order to have: 1 usual NVS partition to store parameters and 2 LittleFS partitions for various log data and configuration.
My question is: should I have to protect every access to flash partitions with a common shared mutex ?
So far, I used three mutexes, one of them for each partition but I'm not sure if this could be totally right...
Very rarely I got the Littlefs filesystems corrupted or inconsistent (with assert() generated internally) so I wonder if a single mutex could solve this issue...
Thank you for any hint!
rayf15