Adjust PWM frequency

Topics about inverter software, improvements and bug fixes. Also release announcements are found here
Post Reply
js1tr3
Posts: 42
Joined: Thu Jun 13, 2019 11:28 am
Location: A2 usa
Contact:

Adjust PWM frequency

Post 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?
1988 Porsche 911 targa with warp11 motor. Soon to be Tesla SDU.
js1tr3
Posts: 42
Joined: Thu Jun 13, 2019 11:28 am
Location: A2 usa
Contact:

Re: Adjust PWM frequency

Post 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?
1988 Porsche 911 targa with warp11 motor. Soon to be Tesla SDU.
Post Reply