The Cypress PSOC4 Controllers are not very common in the maker community. As I would like more makers to be able to use/modify/improve this Actuator, I am designing an Arduino version. It will be based around the MKR Zero with the SAM D21.
Earlier I got the Centered Aligned PWM working for controlling the MOSFETs for driving the Brushless motor. Next was the SPI for reading the Magnetic Absolute encoders for the motor and joint positions. The SPI on the SAMD21 only has a single buffer which is not time efficient for this application. It does have a DMA on the SPI which is much more complex but the most efficient for operation. The problem is that it is not a standard feature for the Arduino system.
I started with the following information.
Now the Adafruit Zero DMA library makes it too easy
and can now be installed by the standard Arduino IDE --> Sketch --> Include Library --> Manage Libraries
It also support Interrupts "dma_callback" to tell when the transfer has completed.