espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.42k stars 7.25k forks source link

esp32c6 lp core in halt high power consumption (IDFGH-13765) #14626

Open Szybet opened 4 days ago

Szybet commented 4 days ago

Answers checklist.

General issue report

In the ulp program (so lp core, the naming is confusing) I call

    ulp_lp_core_lp_timer_set_wakeup_time(20 * 1000000);
    ulp_lp_core_halt();

I know those are called after the main function exits, but I wanted to be sure, the results are the same in both

So, to the issue, in regular call to esp_deep_sleep_start(); the device consumes 350 uA, When I run the lp core it runs then exits with the code above, then the device consumes 400 uA but doesn't wakes up, which is normal, I didn't call ESP_ERROR_CHECK(esp_sleep_enable_ulp_wakeup());. When I call it and then go to sleep, the lp core does wake up how it's supposed to but the power consumption is 900 uA while the lp core is not running. It's really a lot, I think something is wrong because at that point going to full deep sleep and waking up the hp core would give similar results in the long run.

The issue described here: https://esp32.com/viewtopic.php?t=34643 sounds similar to my problem but I checked, I call the correct functions

my esp idf version is 5.3 As already mentioned that's on the esp32c6, I measure the currents with NRF-PPK2

Any ideas? Thanks

ESP-Marius commented 3 days ago

Hi,

Can you try running the GPIO example (just delete the GPIO related code from it) and see what you get?

I just did on v5.3.1 and i got reasonable results when measuring with my devkit (10 uA when ULP sleeping, peak 2 mA when ULP woken up)

Szybet commented 3 days ago

Yes, I have done some testing and on the devkit via the measuring pins I get 10 uA and 2 mA when running. Maybe the cause are rtc pins being initialized? How do I control what they do (Low, high) while the lp core is not running? Do they remember the previous state when the lp core halts?

Szybet commented 1 day ago

Yes, configuring the rtc gpio causes this, rtc_gpio_isolate fixes it but dissalows the lp core to use the gpio... Any idea how to fix it?

ESP-Marius commented 1 day ago

Are these input or output pins? what do you want them to do while the ULP is sleeping?