mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
esp32: Fix not the right time spent in a deep sleep
Before entering the deep sleep, the RTC and FRC counters are synchronized. Updating the boot_time. Added a unit test for this case. Fixed warnings for MULTIPLE_STAGES Closes https://github.com/espressif/esp-idf/issues/1840
This commit is contained in:
@@ -203,7 +203,7 @@ void IRAM_ATTR esp_deep_sleep_start()
|
||||
{
|
||||
// record current RTC time
|
||||
s_config.rtc_ticks_at_sleep_start = rtc_time_get();
|
||||
|
||||
esp_sync_counters_rtc_and_frc();
|
||||
// Configure wake stub
|
||||
if (esp_get_deep_sleep_wake_stub() == NULL) {
|
||||
esp_set_deep_sleep_wake_stub(esp_wake_deep_sleep);
|
||||
|
Reference in New Issue
Block a user