How to modify the frequency of the PWM output? (SparkFun PRO MICRO)

Hí,

Sorry in advance, but this isn’t my language

I am working on a small project,

In one sections, I must modify the frequency of a PWM output (to move a stepper motor)

because while it is generating these pulses(for 20 seconds), the program shows a series of images on an OLED screen:

Example (temporal chronology)

  1. PWM pin (frequency 1) - OLED (showing images) for 20 seconds

  2. PWM pin (frequency 2) - OLED (showing images) for 20 seconds

How to modify the frequency of the PWM output?

Regards :wink: