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

Counter Sync token with more than -30 from last count get accepted #11

Open
JoLo33 opened this issue Aug 29, 2022 · 2 comments
Open

Counter Sync token with more than -30 from last count get accepted #11

JoLo33 opened this issue Aug 29, 2022 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@JoLo33
Copy link

JoLo33 commented Aug 29, 2022

Hey,

a counter sync token which counter is more than 30 behind the highest entered counter of token get accepted. The problem is in the check in IsCountValid function. Wrong limits are used, the MAX_TOKEN_JUMP define is used but that is 64 and not 30.

Regards Jonas

JoLo33 added a commit to JoLo33/OpenPAYGO-HW that referenced this issue Aug 29, 2022
changed: CHECK_BIT macro, return only 0 or 1
changed: for loop in MarkCountAsUsed, so that the correct counts are marked
changed: IsCountValid, so that the limits are correct as explained in general documentation
@dmohns dmohns added the bug Something isn't working label Jan 18, 2023
@benmod
Copy link
Member

benmod commented Mar 23, 2023

Hello,

64 is the correct recommended value. Is there a place in the documentation where it mentions 30? If so it should be changed there.

Kind regards,
Benjamin

@benmod benmod added documentation Improvements or additions to documentation and removed bug Something isn't working labels Mar 23, 2023
@JoLo33
Copy link
Author

JoLo33 commented Mar 23, 2023

Hey Benjamin,

yes it is then wrong in the documentation. in the general_documentation.pdf on Page 10 in chapter "Counter Synchronisation feature" you will find "If the token matches and the count is either 0 or between last count - 30 and last count + 100, it will set the internal token count to that count."

Best regards
Jonas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants