The symptom: PSC and ARR look right, but the frequency is wrong
STM32 timer math is compact enough to fit in one line, yet small assumptions can move a PWM output far from its target. Before changing firmware at random, check the timer clock, the register offsets, and the way you chose PSC and ARR. The examples below use an up-counting, edge-aligned time base.
Mistake #1: forgetting both “+1” terms
For this mode, the project calculator uses:
counterClock = timerClock / (PSC + 1)








