Skip to content

SAMD51P - TC Clock Enabling Procedure Incomplete #727

@fko-kuptec

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

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