You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that multiple internal types work with int64_t so the fix isn't super obvious: you'd probably have to change all the internal sleep-related functions that use this type.
A short-term solution could be adding documentation about the value limits of the function parameter for esp_sleep_enable_timer_wakeup()
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
esp_sleep_enable_timer_wakeup with UINT64_MAX wakes up immediately
esp_sleep_enable_timer_wakeup with UINT64_MAX wakes up immediately (IDFGH-14485)
Jan 22, 2025
Answers checklist.
IDF version.
5.3.2 (tested), 5.4 (very likely)
Espressif SoC revision.
ESP32-S3 (tested), but likely all SOCs
Operating System used.
Linux
How did you build your project?
Command line with CMake
If you are using Windows, please specify command line type.
None
Development Kit.
unPhone (likely platform-independent issue)
Power Supply used.
Battery
What is the expected behavior?
Context:
esp_err_t esp_sleep_enable_timer_wakeup(uint64_t time_in_us)
esp_sleep_enable_timer_wakeup(UINT64_MAX);
should time out for a very long time, but it wakes the device up immediately.The cause is likely the internal code for
esp_sleep_start()
:esp-idf/components/esp_hw_support/sleep_modes.c
Line 796 in 0f0068f
It converts the
uint64_t
toint64_t
, causing the value to overflow.What is the actual behavior?
esp_sleep_enable_timer_wakeup(UINT64_MAX);
causes a boot loop.Steps to reproduce.
More Information.
The problem is that multiple internal types work with
int64_t
so the fix isn't super obvious: you'd probably have to change all the internal sleep-related functions that use this type.A short-term solution could be adding documentation about the value limits of the function parameter for
esp_sleep_enable_timer_wakeup()
The text was updated successfully, but these errors were encountered: