STM32 - Clock signal generator using a timer - STM32CubeMX generated code
You must set a period for the timer in field "Counter Period (AutoReload Register - 16 bits value)" (third line). This, together with the prescaler (first line) and the APB1 frequency, determines the timer frequency.

The "Pulse" setting for the PWM outputs determines the duty cycle. All PWM outputs for timer 3 have the same frequency (the timer frequency), but independent duty cycle settings (one per PWM output).



Note that it is easy to make off-by-one errors. This applies both to the prescaler (for example, 0 means divide by 1) and the timer period. For instance, in this example where the APB1 frequency is 48&nbsp;MHz, the frequency is 48&nbsp;MHz / 3 / 51 = 313.725 kHz (and not, for example, 48&nbsp;MHz / 3 / 50 = 320&nbsp;kHz). For the PWM setting, on the other hand, the setting is the actual effective value (not +1). The duty cycles are 45.1%, 64.7%, 13.7%, and 5.9%, respectively.

(I have a similar setup for a different STM32 processor, but also set up with STM32CubeMX and compiled/run under OpenSTM32. I have verified the frequency and all four duty cycles on an oscilloscope (within the measurement accuracy).)

In your case, presuming the APB1 frequency is actually 28&nbsp;MHz, a counter period of 19 would give exactly 1.4000000 MHz (28&nbsp;MHz / 1 / 20) - though if you are using the internal oscillator not more than three significant digits are warranted (I found mine to be off by about 0.37%, within the specification of 1%). If you set the PWM pulse to 10 then the duty cycle should become 50.0%.