Skip to content

SAMD51P - TC Clock Enabling Procedure Incomplete #727

Description

@fko-kuptec

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! 😊

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions