Closed MadDogMayCry0 closed 6 years ago
Wake stub requires rtc_fast_mem
Many many thx @negativekelvin :+1: one more question by the theme. It's can be set from the application code, or scetch, or must be settet through meke menuconfig?
I did ESP32_DEEP_SLEEP_WAKEUP_DELAY 5000 but still
rst:0x5 (DEEPSLEEP_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) flash read err, 1000 ets_main.c 371
I think this is a Hardware issue about flash chip model... try to found it out Pls help!
What flash chip is better for esp32? My chip is HJ1723 (GIGADEVICE) 25Q16CT AP0T866 Datasheet
ESP32_DEEP_SLEEP_WAKEUP_DELAY only works if ESP_PD_DOMAIN_RTC_FAST_MEM is ESP_PD_OPTION_ON
Your flash chip has 1800us startup time while for example winbond w25q has 20us
@negativekelvin Then i don't understand issue for ESP_PD_DOMAIN_RTC_FAST_MEM is ESP_PD_OPTION_OFF and flash read err, 1000 after deep sleep... as i said in first message - no problem with ESP_PD_DOMAIN_RTC_FAST_MEM is ESP_PD_OPTION_ON
The feature pointed out by @negativekelvin above (CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY) allows delaying startup, compensating for flash chip startup time. This feature works using deep sleep wake stub, which is placed into RTC Fast memory. If you force power down RTC Fast memory, then this wakeup stub code will be lost, and startup will not be delayed. This will cause flash read error.
In general, there is little need to call esp_deep_sleep_pd_config function in the app, as the default behavior is to power down everything that is not really needed. e.g. if your application does not use RTC slow memory for data storage, this memory will be powered down.
@igrr Then, in my case i just need to change flash chip (on faster) and it's fix's my problem? I do not store either in fast or in slow memory nothing on how much I understand. Or i'm wrong? What is issue in my case then? Or i have no possibility to fix this?
I think you need to remove the call which powers down RTC Fast memory. This will fix the problem, and difference in power consumption will be very small (less than 0.5uA).
thx @iggr but i think it's no issue for this time :(
Wroom-32 Chip is ESP32D0WDQ6 (revision 1)
if esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_ON); then it's ok.
No any RTC_DATA_ATTR It's a BUG or i lose something?