If you want to access the timer or PWM outputs more direct style here are some helpful links:
Arduino forum post showing what the different timers are used for
Timer | Channels | Outputs | Note |
TCC0 |
4
|
8
|
Fully used for PWM (outputs 0..3 are replicated on 4..7) |
TCC1 |
2
|
4
|
Fully used for PWM (outputs 0..1 are replicated on 2..3) |
TCC2 |
2
|
2
|
Fully used for PWM |
TC3 |
2
|
2
|
Fully used for PWM |
TC4 |
2
|
2
|
Used by Servo |
TC5 |
2
|
2
|
Used by Tone |
Example using timers to change frequency based on analog input
Max Baders Utilities to change the timers on arduino Zero
Adafruit Arduino Zero Timer Wrapper Library on Github
Arduino Forum post on how to manually configure the timer modules for custom PWM frequencies etc.
Adafruit forum post on setting timers manually
Github Arduino example of IR transmit and Receive on SAMD core.
Github Arduino SAMD Core Tone Library Source – uses TC5
Sparkfun SAMD21 General info on the ARM core and features + SERCOM configuration
Adafruit SAMD21 Additional serial port setup tutorial