-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
System clock sometimes jumps back ~54secs (IDFGH-396) #2513
Comments
As a followup, this seems to be happening only when the CPU is running at 160 or 240Mhz, not on 80. The investigation continues. |
I'm experiencing the same thing on my application using v3.0-rc1, clocked at 160MHz. What's interesting is that there have been a number of commits to esp_timer_esp32.c since that version to address the overflow capture behavior. I haven't been able to reproduce the time-shifting behavior. When it does happen, it will jump backwards, then increment as expected for 54 seconds, then jump back 54 seconds, then increment 54 seconds, etc. @snoutmate You've seen the issue occur even on |
@snoutmate and @NateBowen thanks for reporting. Could you describe which also tasks are running at the time? Perhaps you have your frequent interruptions or something else (which peripherals are used). Please help me understand what happened. Thanks. |
@NateBowen Do you also use |
@NateBowen @snoutmate Hi, would you help share if any updates for this issue? Thanks. |
We're no longer using the esp_timer library for our basic application clock, so I have no updates on this issue. |
Hello,
i noticed that the system clock (esp_timer_get_time()) on our app sometimes(1-2xhour) jumps back ~54 secs.
Looking through the esp-idf timer code, i see the rollover of the internal 32-bit usecs clock is around the same value, so my guess is rollover happens without all the rollover-handling code firing, though at a glance i don't understand how that could be the case.
I'm running on ESP32 with Unicore, with multiple threads. NTP is disabled. Happens on all master/v3.1/v3.0.
My sdkconfig: https://pastebin.com/6L4DcMiH
Main thread code:
Output:
E (355905) Main: ESP system clock SHIFT: -53666211 usecs
...
E (815595) Main: ESP system clock SHIFT: -53666244 usecs
The text was updated successfully, but these errors were encountered: