Page 1 of 1

Adjust PWM frequency

Posted: Fri Sep 23, 2022 2:27 am
by js1tr3
I tried looking at the code, could someone point me to where the ARR register is being set for TIM1 (PWM), I want to try reducing the PWM frequency to 12kHZ from 17.5. what else would this break in the code since it appears that all clocks are using TIM1?

Re: Adjust PWM frequency

Posted: Fri Sep 23, 2022 2:34 am
by js1tr3
Answered my own first question
https://github.com/jsphuebner/stm32-sin ... ration.cpp

/* PWM frequency */
timer_set_period(PWM_TIMER, pwmmax);

any guidance on the 2nd?