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

Real time clock seems slow #14

Open
CarlKCarlK opened this issue Dec 14, 2024 · 6 comments
Open

Real time clock seems slow #14

CarlKCarlK opened this issue Dec 14, 2024 · 6 comments

Comments

@CarlKCarlK
Copy link

Greetings. It's working great and is even now useable. Here are some minor issues that I notice:

It gets its time from the real-time clock that tells how long the device has been running. That seems to be about 5 seconds per minute slow.

Thanks for your work on this project.

@matgla
Copy link
Owner

matgla commented Dec 15, 2024

Hi,
What timer for a real-time clock is in use?
If RTC, then it is not implemented yet.

How do you measure time? If you compare it to host time, it is expected anyway. Those simulations are not real-time, so virtual time should be used.

@CarlKCarlK
Copy link
Author

I understand. Thanks.

@matgla
Copy link
Owner

matgla commented Dec 15, 2024

This is to be checked. If other timer than RTC is in use and simulation accuracy is set to enough precision, then virtual time should be reported correctly.

@matgla matgla reopened this Dec 15, 2024
@CarlKCarlK
Copy link
Author

I'm using https://docs.rs/embassy-time/latest/embassy_time/struct.Instant.html which apparently does NOT use the RTC.
It gives me milliseconds since power on. On real hardware, I see no noticeable drift even after a few days, but it is still not the RTC.

@matgla
Copy link
Owner

matgla commented Dec 29, 2024

Hi, maybe you have a log or firmware with visible RTC slowness. It will be easier to debug :)

@CarlKCarlK
Copy link
Author

I think this is unfixable because the simulation is not 1:1 time. So, feel free to close it as "won't fix".

p.s. If you want, I can give you the latest *.bin for my clock app with instructions how to set and display seconds and you can watch it drift. The emulation runs about 1/2 the speed of real time.

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

No branches or pull requests

2 participants