-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix: Hitag S logtrace time #2522
Conversation
You are welcome to add an entry to the CHANGELOG.md as well |
armsrc/hitagS.c
Outdated
AT91C_BASE_TC0->TC_CCR = AT91C_TC_CLKEN | AT91C_TC_SWTRG; | ||
AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKEN | AT91C_TC_SWTRG; | ||
AT91C_BASE_TC0->TC_CCR = AT91C_TC_CLKEN; | ||
AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKEN; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a bug mentioned in the errata of the arm chip, use previous declaration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find any Timer Counter info in the errata section. If you are referring to the reset, the three timer counters are reset together using AT91C_BASE_TCB->TCB_BCR = 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
And then I will close this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would be the ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Then the reset is already handled together using the SYNC signal (AT91C_BASE_TCB->TCB_BCR = 1) which generates a software trigger for each channel simultaneously. I think it's ready to be merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No,
Revert back the = AT91C_TC_CLKEN | AT91C_TC_SWTRG
parts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why? The reset is properly handled by the SYNC signal. Is the redundant code for bug-proofing in case someone copy/paste it elsewhere, or just to maintain consistent code style?
Anyway, I will revert it back. Please reopen this PR
armsrc/hitagS.c
Outdated
AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKEN | AT91C_TC_SWTRG; | ||
AT91C_BASE_TC0->TC_CCR = AT91C_TC_CLKEN; | ||
AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKEN; | ||
AT91C_BASE_TC2->TC_CCR = AT91C_TC_CLKEN; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as previous comment
9f78b64
to
35c8dfc
Compare
Thank you! |
No description provided.