-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
SAMD21G18A TCC3 Timer Support #13
Comments
You find everything you need in the datasheet, I just started by creating tcc3.h from tcc0.h (as it has the same specs) for my own hackaround:
|
Next, I added the following line 311 in samd21g18a.h (as I'm using this particular processor):
and line 411
and finally line 515:
Edit: If I make some mistakes on the way, feel free to tell me before I find out later. Additionally, I added line 120:
and line 214:
Not to forget line 185 (after the reserved position 28):
and changing lines 519 and 520:
Edit: Found one more position to change, lines 364-366:
|
This comment has been minimized.
This comment has been minimized.
Next, I added in file evsys.h (instance) line 165:
and in line 206:
|
Next file to change was samd21g18a (pio) by adding the following lines:
|
In the Power Manager (pm.h, component) I changed line 366:
and added in line 420:
|
Finally I added in gclk.h (component) in line 150: and in line 188:
|
So here is my (untested) Code, can someone with more knowledge than me plz check and test it accordingly? Edit: in the pio-file #DEFINE has of course to be replaced with #define (lower case). Uploaded corrected Code. |
Hello: |
Hey, I'm getting an PWM Output from the pins, so either I have coded something else wrong or this is working. I can't tell for sure, as I do not see myself qualified enough to test it thoroughly. |
Hey, there is a bad news based on the DS40001882F datasheet for SAM D21/DA1 Family, |
Ok, thx for testing; I must have done something else wrong then to get a PWM-like output there. Probably the addressing makes the Pins turn on and off by accident when accessing the power manager or something. |
I've been trying to use TCC3 on the SAMD21 in a project, but there is not support for it in Arduino. It looks like Atmel/Microchip added TCC3 in a later silicon revision. Is there any way I could get these built?
I'm willing to do it myself, but I'm afraid I don't have the know-how.
The text was updated successfully, but these errors were encountered: