Slow smooth diy motor with simpleFOC

The uno has a crappy 8bit analogWrite. It looks like a saw tooth sign wave by the time it gets to your l2634! Especially if you’ve got a high value for your motor.power_supply but are just using a small fraction of that.
I believe the stm32 (like the esp32) is capable of 12bit output e.g. using analogWriteResolution(12);
The esp32 implementation (by @David_Gonzalez) goes one better and ensure that the pwm output is ‘centralised’.
The end result is a motor that runs without that annoying whine and is probably smoother and more efficient.