In an effort to make the controller accessible to more makers I've strated designing an Arduino based system. It uses the SAM D21 G 32-bit micro-controller as used on the MKRZERO board. This chip has an advanced Timer Counter Controller which can generate three centre aligned PWM signals. After sorting out the correct pin mapping it is up and running.
The code is based on information provided in the Arduino forum by MartinL.
Now with deadband
I will create a github shortly
Next up dual SPI. One for the absolute magnetic encoder sensors and the other for the FET gate Driver IC.
PID and FOC should be easily ported across.
Voltage and current measurement may be difficult because the Arduino doesn't support free running sequential ADCs very well.
The SAM D21 does not have CAN commucations so it will need RS485 and USB.