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

SAMD51P - TC Clock Enabling Procedure Incomplete #727

Open
fko-kuptec opened this issue Feb 19, 2024 · 0 comments
Open

SAMD51P - TC Clock Enabling Procedure Incomplete #727

fko-kuptec opened this issue Feb 19, 2024 · 0 comments

Comments

@fko-kuptec
Copy link
Contributor

fko-kuptec commented Feb 19, 2024

I was trying to get a manually configured TC (timer counter) working, however it just wouldn't want to start. Today, I found out that the GenericClockController::tcx_tcy() methods are not sufficient to enable the clocks for a TC instance. Additionally, the corresponding tcx_ bit in the APB mask of the MCLK must be set. Since the GenericClockController consumes MCLK at construction and does not seem to expose direct access to it, I have to set this bit before creating the GenericClockController instance. Now, the timer works.

Maybe I am mistaken, but I would expect these mask bits to be automatically set by the tcx_tcy() methods. Is this intended behaviour?

I don't know, whether this issue only affects the SAMD51P or the other targets as well.

Thank you for your work! 😊

@fko-kuptec fko-kuptec changed the title ATSAMD51P - TC Clock Enabling Procedure Incomplete SAMD51P - TC Clock Enabling Procedure Incomplete Feb 19, 2024
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