-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Bug in delayMicroseconds() #5000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Do you have a crashlog for that? And minimal example code? the way I read it in arduino-esp32/cores/esp32/esp32-hal-misc.c Lines 149 to 163 in 8dc70e0
arduino-esp32/cores/esp32/esp32-hal-misc.c Lines 134 to 137 in 8dc70e0
arduino-esp32/tools/sdk/include/esp32/esp_timer.h Lines 185 to 190 in af11921
The |
One issue in the code is this: Assume m=micros() = 0xffff0000 and us = 0xffff. Better is a while loop without overflow check:
|
now I understand, why esp32 is not running stable. |
ESP32 crashes when I call the function after ~1 hour 20 minutes of usage, because esp_timer_get_time() return a int64_t value and is parsed as uint32_t in delayMicroseconds().
The text was updated successfully, but these errors were encountered: