RTCWDT_RTC_RESET on light sleep
Posted: Sat Sep 21, 2024 4:04 pm
Hi folks,
I have developed a product that runs on the ESP32-S3 very well and is stable. However, when I attempted to save energy by replacing `delay()` with light sleep at the end of my `loop()`, the ESP32-S3 started rebooting, reporting an RTCWDT_RTC_RESET error.
From my research, it seems that the WDT_RTC generates a timeout to prevent the system from sleeping indefinitely due to bad programming, which is helpful. However, I haven’t been able to find a way to adjust the RTC timeout interval or reset the RTC timer.
I've noticed that people have been reporting this issue in forums since 2021, but no solution has been provided.
I would greatly appreciate any assistance.
The code I am using is:
Best regards
Fernando
I have developed a product that runs on the ESP32-S3 very well and is stable. However, when I attempted to save energy by replacing `delay()` with light sleep at the end of my `loop()`, the ESP32-S3 started rebooting, reporting an RTCWDT_RTC_RESET error.
From my research, it seems that the WDT_RTC generates a timeout to prevent the system from sleeping indefinitely due to bad programming, which is helpful. However, I haven’t been able to find a way to adjust the RTC timeout interval or reset the RTC timer.
I've noticed that people have been reporting this issue in forums since 2021, but no solution has been provided.
I would greatly appreciate any assistance.
The code I am using is:
- // Sleeps 20ms on loop(), instead of delay()
- esp_sleep_enable_timer_wakeup(20 * 1000);
- // Keep domains active
- esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
- esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_ON);
- esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_ON);
- // Get a nap (20ms light sleep)
- esp_light_sleep_start();
Fernando