As far as I understand this video, a simple form of FOC is utilized by the controls from an Arduino Uno. I know the inner hardware of the Atmega 328P chip quite well, but I cannot figure out how this MPU is able to provide the PWM-signals for three phases (three half bridges). I think that the driver board receives all three PWM signals from the MPU. Are timer1 and timer2 synchronized to do this? I think that timer1 can only provide two PWM signals (not three as in many other MPUs).
I tried to look a bit into the libraries, but I did not find the low-level code that sets the timers.
How are the timers of this MPU utilized here to provide the PWM-signals?
Are the PWM-frequency fixed to be above 31.25 kHz (=16.000 kHz/512)?
Yep, it uses multiple timers. The frequency is clamped to either 32kHz or 4kHz due to limited prescaler options. The code is in the drivers/hardware_specific folder:
Thank you for your replies. My guess about how the timers needed to be used was right then. There is not much flexibility in PWM-frequency with this MPU.
It is nice to know how to find the code used as well.