am32-firmware / AM32

GNU General Public License v3.0
312 stars 111 forks source link

added PWM dithering support #114

Open tridge opened 2 weeks ago

tridge commented 2 weeks ago

this adds a pwm_differing parameter to dither the PWM frequency. Defaults to zero. The aim is to reduce the impact of resonances and harmonics by spreading out the commutation frequency.

Note that the value is relative to TIM1_AUTORELOAD which varies between MCUs. We should probably normalise this to be in maybe 10Hz units?

I've flown this with the VimDrones Nano L431 ESCs on DroneCAN. I had hoped it would eliminate an annoying buzz on the copter, but it didn't