Normal reset after timed wakeup with firebeetle DFR1075

userHead Wolfgang.Koch 2024-11-25 04:24:31 66 Views1 Replies

Hallo,

 

I am using the following code to get the Firebeetle (ESP32-C6)  into deep sleep and wake up after some time. Code ist compiled in Arduino IDE.

 esp_sleep_enable_timer_wakeup(2000000);

 esp_deep_sleep_start();

I need to store an integer value in  RTC-memory to be available after restart. It is defined with RTC_DATA_ATTR attribute.

But this does not work. The ESP32 wakes up, but the variable contains 0, and the wakup-reason is not the timer but a normal hardware reset. I use esp_sleep_get_wakeup_cause()  for retrieving the wakeup-reason. 
It is not a problem of power supply, I have tested it with different supplies which deliver enough power.

 

The code works for me with an older ESP32.

 

Thanks in advance for any ideas!