-
Notifications
You must be signed in to change notification settings - Fork 89
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
Change timer value on the fly #72
Comments
+1 |
Count me in!
That does not work. In fact, a sketch like this will just seize up like a cheap watch. |
+1 |
Maybe Can anyone test if calling |
setFrequency calls TC_Configure which disables clock and interrupts. Although interrupts are re-enabled by setFrequency later, the clock is still disabled which can be enabled by TC_Start. |
has anyone figured out how to stop the disabling of the clock? |
You have to recompile libsam after the modification of tc.c or you can simply change RC by TC_SetRC function. In both cases, CV, counter value must be checked (see. TC_ReadCV) and if it is greater than RC, you must reset it (see. TC_Start), otherwise the next interrupt occurs only when CV wraps around, which can be several hours depending on the clock setting. |
Hello,
i want to change the timer intervall on the fly
i generate the intervall time with an formula
how can i update the changed value on the fly? do i have to stop and start the Timer again ?
The text was updated successfully, but these errors were encountered: