AnsweredAssumed Answered

SPI data transfer using DMA with a L6470 dSPIN device

Question asked by goeck on Apr 22, 2014
Latest reply on Apr 24, 2014 by goeck
Hey everyone,

I am using a STM32F0-Discovery with a L6470 stepper driver IC attached. As a sofwtare basis I currently use ChibiOS. I am able to command the L6470 utilizing the DMA controller for SPI data transfer but I see some glitches on the lines. This is due to the CS pin toggeling after each single byte has been sent. If I was able to send all command bytes, e.g. run command has 4 bytes, in a row transmission would be done way more efficent and quicker.
To overcome this issue I thought of having the DMA shifting out the 4 bytes (to stick with the example) but to somehow hook into the stream, each time a single byte has been shifted out, toggeling the CS pin and then let the DMA run again. Let me put it the other way, DMA should handle the toggeling of a single GPIO pin as well as shifting out bsytes over SPI. Is that possible?

Which other solution might be applicable to the combo of two ST devices, what did the designers have in mind? Solution now is, to do polled SPI data exchange - without DMA, then :-(

Any comment is highly appreciated.