Arduino ZERO timer interrupts

Hi Dan,

Changing the TC's CCx register just changes duty cycle or in other words the pulse width. To change the frequency you need to alter the TC's PER (period) register:

REG_TC4_COUNT8_PER = 0xFF;                   // Set the timer TC4 period register in 8-bit mode
while (TC4->COUNT8.SYNCBUSY.bit.PER);        // Wait for synchronization

Note that on the TC timers the PER register only works for the timer in 8-bit mode.

Reducing the value of the PER register will have the effect of increasing the frequency, but at the expense of losing some resolution.

Regarding the TCCx timers, what pins, duty-cycle, frequency range and resolution (number of steps) do you require? Are your requirements similar to your current example code?

Kind regards,
Martin