I found the
#if CONFIG_WL_SECTOR_MODE == 1
in esp-idf wear_levelling.cpp
but a search of ESP 1.0.2 package for Arduino does not include this define.
How can I set Safety mode for ware levelling in the Arduino ESP32 add on?
How to set ware levelling Safety mode in Arduino ESP add on
-
- Posts: 166
- Joined: Wed Aug 01, 2018 12:06 pm
Re: How to set ware levelling Safety mode in Arduino ESP add on
I guess you are refering to the https://docs.espressif.com/projects/esp ... lling.html Wear Leveling API? The examples are not helping?
Re: How to set ware levelling Safety mode in Arduino ESP add on
I am using the Arduino IDE ESP32 add on V1.0.2.
A search of the code supplied with that package does not find CONFIG_WL_SECTOR_MODE which sets the performance/safe leveling when the sector size is 512, so I cannot change the from the default Performance setting in this case, the SD case.
I dug a bit deeper into esp-idf/components/wear_levelling/wear_levelling.cpp
and found that CONFIG_WL_SECTOR_SIZE sets the wl_flash object
I found
#define CONFIG_WL_SECTOR_SIZE 4096
in the Arduino ESP32 package in sdkconfig.h
so looking at the wear_levelling.cpp code is seems that the wl_flash object is WL_Flash();
as opposed to WL_Ext_Safe(); or WL_Ext_Perf(); when the CONFIG_WL_SECTOR_SIZE is 512.
So does that mean for CONFIG_WL_SECTOR_SIZE 4096 , i.e. the onboard flash IC, that the wear leveling is ALWAYS safe?
A search of the code supplied with that package does not find CONFIG_WL_SECTOR_MODE which sets the performance/safe leveling when the sector size is 512, so I cannot change the from the default Performance setting in this case, the SD case.
I dug a bit deeper into esp-idf/components/wear_levelling/wear_levelling.cpp
and found that CONFIG_WL_SECTOR_SIZE sets the wl_flash object
I found
#define CONFIG_WL_SECTOR_SIZE 4096
in the Arduino ESP32 package in sdkconfig.h
so looking at the wear_levelling.cpp code is seems that the wl_flash object is WL_Flash();
as opposed to WL_Ext_Safe(); or WL_Ext_Perf(); when the CONFIG_WL_SECTOR_SIZE is 512.
So does that mean for CONFIG_WL_SECTOR_SIZE 4096 , i.e. the onboard flash IC, that the wear leveling is ALWAYS safe?
-
- Posts: 166
- Joined: Wed Aug 01, 2018 12:06 pm
Re: How to set ware levelling Safety mode in Arduino ESP add on
After a bit of searching, wear leveling is part of the ESP32 API's.
-
- Posts: 828
- Joined: Mon Jul 22, 2019 3:20 pm
Re: How to set ware levelling Safety mode in Arduino ESP add on
Safety mode will be introduced in ESP-IDF v4.0. Arduino-esp32 v1.0.4 uses IDF v3.2. When v4.0 is released and stable, arduino will update to that upstream version. However, using an advanced feature like this will always require you to compile your own libraries. There are no guarantees that all the arduino libraries will be compatible with safety mode (I think FFat should work).
https://github.com/espressif/arduino-es ... mponent.md
https://github.com/espressif/esp32-ardu ... ster/tools
https://github.com/espressif/arduino-es ... mponent.md
https://github.com/espressif/esp32-ardu ... ster/tools
Who is online
Users browsing this forum: Majestic-12 [Bot] and 28 guests