Seeeduino Xiao PWM

Hi, thank you very much for the time you spend in the answer.
Your code varies the duty cycle, not the PWM frequency. The duty cycle gives the HIGH-time / LOW-time relation. It defines how long the PWM-pin is LOW or HIGH within one time period. The PWM-frequency defines, how often the PWM changes its state within one second.
Best regards,
Holger