Changing Arduino Zero PWM Frequency

Hi mantoui

Thanks for pointing this out.

Yes, in this instance you could make the code more efficient by using GCLK0, but if you wanted divide down the GCLK frequency further to obtain a lower frequency using the REG_GCLK_GENDIV register, then I believe you'd have to use one of the free GCLKs. For example, in my project I divide GCLK4's 48MHz by 3 to obtain 16MHz, so that the PWM timing works out the same as the AVR processors on my Arduino Micro and Mega.