Skip to content
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

[BUG] Temperature auto-reporting (+ others) fail after ~72 Minutes #54

Closed
shadow578 opened this issue Nov 9, 2023 · 3 comments · Fixed by #53
Closed

[BUG] Temperature auto-reporting (+ others) fail after ~72 Minutes #54

shadow578 opened this issue Nov 9, 2023 · 3 comments · Fixed by #53

Comments

@shadow578
Copy link
Owner

shadow578 commented Nov 9, 2023

Bug Description

printer fails to send M155 temperature report after ~72 Minutes of printing.
additionally, the DWIN screen freezes.

when re-enabling temperature report using M115, the reporting works again

@shadow578
Copy link
Owner Author

seems to be caused by overflow of system uptime timer (https://github.com/shadow578/framework-arduino-hc32f46x/blob/6f19b41ea97260abb60e62bb361e3096bf929bcd/cores/arduino/drivers/sysclock/systick.cpp#L4)

changing the timer to uint64_t seems to fix the issue

@shadow578
Copy link
Owner Author

fixed in arduino core by adapting STM32duino's solution. see shadow578/framework-arduino-hc32f46x@ce09dcf

NOTE: millis() will still overflow after ~50 days, idk how to avoid this but other cores seem to have the same issue

@shadow578
Copy link
Owner Author

official arduino docs mention that millis() will overflow after ~50 days, so assuming this is ok.

https://reference.arduino.cc/reference/en/language/functions/time/millis/

@shadow578 shadow578 reopened this Nov 9, 2023
@shadow578 shadow578 linked a pull request Nov 9, 2023 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant