NVS write fail but no error
Posted: Tue Sep 09, 2025 3:21 pm
Hi Everyone,
I faced to a strange problem.
I am developing a product, on some cases, I found even there is no error return, a NVS write cannot really write the new value to the NVS flash. At the same time, I have data logging to the flash too (another partition) and it is also found it cannot work but without flash write error (use partition write api).
1. Is there any accidental possibility to make the flash write protect without returning error? How to know whehther it is invoked the protection and how to return it to normal?
2. If the flash chip on the module is programmed block write protected, why the NVS and flash write returning no error?
3. My application is running at core 1, as usual. And BLE and MQTT (with WiFi) is running at core 0 So I think there may be a potential racing problem of SPI or flash write operation if there is NVS write happened in application and also inside the BLE and MQTT data received callback. Is anyone confirming my understanding is correct?
I am using ESP-IDF V4.4.1
I faced to a strange problem.
I am developing a product, on some cases, I found even there is no error return, a NVS write cannot really write the new value to the NVS flash. At the same time, I have data logging to the flash too (another partition) and it is also found it cannot work but without flash write error (use partition write api).
1. Is there any accidental possibility to make the flash write protect without returning error? How to know whehther it is invoked the protection and how to return it to normal?
2. If the flash chip on the module is programmed block write protected, why the NVS and flash write returning no error?
3. My application is running at core 1, as usual. And BLE and MQTT (with WiFi) is running at core 0 So I think there may be a potential racing problem of SPI or flash write operation if there is NVS write happened in application and also inside the BLE and MQTT data received callback. Is anyone confirming my understanding is correct?
I am using ESP-IDF V4.4.1