-
Notifications
You must be signed in to change notification settings - Fork 15
Bug when going from a >20000us period to a <20000us period. The timer period become 4 times greater. #3
Comments
I'm amazed that you found out an interesting hard-to-find bug. I'm able to duplicate it and will investigate and fix. This is the sketch to duplicate
and the Terminal output
|
Already found out and fixed the bug. Will publish the new release within today. Test result for TC3 OK
|
Amazing ! Incredibly fast ! What was? |
Test for TCC also OK
|
I didn't expect the |
Great ! 👍 Thank you. |
I have to thank you 👍 for finding the interesting bug. Your contribution will be noted in new release. |
Already published the new SAMD_TimerInterrupt Releases v1.4.0 with your contribution noted in Contributions and Thanks. You can also see a new RepeatedAttachInterrupt_uS example, based on yours, has also been added to the new Release. Please test and see if everything is working OK on your side. I'm looking forward to receiving your next Contributions. Regards, Releases v1.4.0
|
Hi @khoih-prog, |
Describe the bug
If I set a interval greater than 20000us and then set a smaller than 20000us, I'll have my period 4 times bigger than expected.
Steps to Reproduce
Expected behavior
The expected behavior was a timer period of 19995us.
Actual behavior
The actual behavior was a timer period 4 times bigger.
Information
Arduino Core v1.8.9
Atmel Studio
Some observations
If I start with 19000us, works fine. Then I go to 21000us, works fine. When I go back to 19000us, the bug happen.
Only noticed when going from a bigger(>20000) to smaller(<20000). And since this happen the smaller won't work anymore.
I'm suspecting some bug with the preScaler.
The text was updated successfully, but these errors were encountered: