You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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! 😊
The text was updated successfully, but these errors were encountered:
fko-kuptec
changed the title
ATSAMD51P - TC Clock Enabling Procedure Incomplete
SAMD51P - TC Clock Enabling Procedure Incomplete
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 theGenericClockController::tcx_tcy()
methods are not sufficient to enable the clocks for aTC
instance. Additionally, the correspondingtcx_
bit in theAPB
mask of theMCLK
must be set. Since theGenericClockController
consumesMCLK
at construction and does not seem to expose direct access to it, I have to set this bit before creating theGenericClockController
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! 😊
The text was updated successfully, but these errors were encountered: