ESP32-S2-DevKit-Lipo-USB RTC SLOW MEM doesn't work

findmyname
Posts: 1
Joined: Sat Jun 19, 2021 1:06 pm

ESP32-S2-DevKit-Lipo-USB RTC SLOW MEM doesn't work

Postby findmyname » Sat Jun 19, 2021 2:07 pm

Hello,

I bought this board ESP32-S2-DevKit-Lipo-USB manafucture by Olimex. They state that the board is compatible with ESP32-S2-Saola-1:

Code: Select all

ESP32-S2-DevKit-Lipo-USB board is pin-to-pin compatible with Espressif ESP32-Saola-1, but adds Lipo charger and the ability to work on LiPo power when external power supply is missing, allowing handheld applications.

ESP32-S2-DevKit-Lipo-USB uses the build-in USB interface and can work as host and device, even when powered by the LiPo battery.
I'm trying to store var in RTC slow memory but after deep sleep the variable has always default value. I'm kind of lost.

I define var at the begging of the program:

Code: Select all

RTC_DATA_ATTR static int bat_v_rtc;
I increment the var just for the test in the main code:

Code: Select all

bat_v_rtc++;
I also print it before and after increment operation.

I enter DS, I also explicitly activate RTC slow memory:

Code: Select all

    esp_wifi_stop();
    ESP_ERROR_CHECK( esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_ON) );
    esp_deep_sleep(sleep_interval)
When the VAR is printed after wake up it has default value 0.

Additional info:
- The value of pointer is 0x50000014. It seems to be pointing into correct memory area as SLOW memory starts at 0x50000000 per DOC.
- I tried to enable option Enable Ultra Low Power (ULP) Coprocessor in the menu-config but it didn't helped.
- I printed value of s_config.pd_options[ESP_PD_DOMAIN_RTC_SLOW_MEM] at the end of the function get_power_down_flags and it equals to 1 which seems to be correct.
- ESP IDF version:

Code: Select all

 $ idf.py --version
ESP-IDF v4.3-rc-dirty
- Furthermore I tried also this esp-idf example (sntp example) and It always prints boot count: 1 as well.

Do you have an idea how to debug it further or what can be wrong ?

Who is online

Users browsing this forum: Baidu [Spider] and 117 guests