Changing Arduino Zero PWM Frequency

Hi MartinL
How to set d3 and d4 pin to 20kHz or 30khz (arduino M0)

and change duty cycle in loop to control the motor with high resolution (10 bit) for example
can i connect to it to tcc0 ? or i need tcc0 to d4 and tcc1 to d3 ?