Need a working example of ESP32-S2 code for ULP-FSM
Posted: Thu Mar 11, 2021 7:42 pm
Hi! Can anybody provide a working example of ESP32-S2 code for ULP-FSM? I checked with https://github.com/espressif/esp-idf/tr ... system/ulp but it rather works for ESP32 while I need it for -S2. The original "ulp" example project even doesn't compile if target is set for ESP32-S2.
I inserted TIMER wakeup in faulty code, see below. Really I checked various insertions into example's asm code, trying to find out whether ULP program is really running but I got no evidence of that. No ULP wakeup happens, no enforced update to "edge_count" propagates to main CPU code.
Beginning of the log:
Is RTC slow memory powered off in deep sleep? By default it doesn't. I have no other idea what's hapennig.
I employ ESP32-S2-WROVER, 4 Mb flash, 2 Mb PSRAM (enabled in menuconfig), so memory issues are not anticipated, Real size of binary image is about 186500 bytes. ESP-IDF code base is version 4.2.
Thanks.
I inserted TIMER wakeup in faulty code, see below. Really I checked various insertions into example's asm code, trying to find out whether ULP program is really running but I got no evidence of that. No ULP wakeup happens, no enforced update to "edge_count" propagates to main CPU code.
Code: Select all
//TODO unsupported ESP_ERROR_CHECK( esp_sleep_enable_ulp_wakeup() );
ESP_ERROR_CHECK( esp_sleep_enable_timer_wakeup(0x000000000800000) ); // quick "fix"
Code: Select all
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x4
load:0x3ffe6104,len:0x1308
load:0x4004c000,len:0x1580
load:0x40050000,len:0x1fe8
entry 0x4004c2e0
Not an ULP wakeup, initializing ULP
Entering deep sleep
I employ ESP32-S2-WROVER, 4 Mb flash, 2 Mb PSRAM (enabled in menuconfig), so memory issues are not anticipated, Real size of binary image is about 186500 bytes. ESP-IDF code base is version 4.2.
Thanks.