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

C pigpio timer inaccuracy on raspbery pi 4 with raspian #594

Open
nhunder opened this issue Dec 17, 2023 · 0 comments
Open

C pigpio timer inaccuracy on raspbery pi 4 with raspian #594

nhunder opened this issue Dec 17, 2023 · 0 comments

Comments

@nhunder
Copy link

nhunder commented Dec 17, 2023

Hello there,
I am using the pigpio C library and tried to figure out what accuracy the timerfunctionality has with the following code:

Screenshot 2023-12-17 154328

the output of the code looks something like this with everything in microseconds:

625
375
0
250
500
375
376
624
250
375
500
375
625
500
125
500
125
750
375
250
625
500
375
251
624
500
375
125
250
375
500
250
375
375
250
250
0
375
750
750
500
750

does anybody know where this inaccuracy n*125us for every timer interrupt come from.
i aasume it has something to do with kernel and the interrupt priority of the timerinterrupt, because i noticed under heavy load of the OS the inaccuracy becomes bigger.

And do you know if there is a possibility to get a more reliant timer with this library?

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

1 participant