Changing Arduino Zero PWM Frequency

Hi Nico,

And then I simply use the AnalogWrite for PWM as always right?

Unfortunately the issue with the analogWrite() function, is that it will set up a predefined timer and frequency on a given pin, this will interfere with code above.

if I would like to use the digital pins 2-3 for the same purpose, do I need to change the value to another timer or is the code the same?

That depends if you need to change the signal's frequency (period) or duty-cycle. Changing the frequency affects the whole timer and all of its output channels, while the duty-cycle can be set for each individual channel.

What would you like the LED outputs to do? What frequency (range) and duty-cycle do you intend to use?