AnsweredAssumed Answered

STM32F4xx Using DMA Transfer Complete Callback with SPI

Question asked by cow.moo on Feb 10, 2016
Latest reply on Feb 13, 2016 by kostka.tim
I just posted this message but it seems to have gotten lost by the forum system. :(

Anyway, I'm using SPI with DMA to talk to a SPI flash chip. I'm using the TXRX complete callback handler to detect when a transfer is finished and change internal states so the application can be notified when stuff is done.

But in some cases I use the TXRX complete callback to start new transfers. For instance on my particular chip the write enable requires a 1 byte transfer followed by the actual data to write. So I start the first transfer, and when it's done and the callback gets called I try to start the next transfer. But the SPI module never transmits anything the second time, nor does it ever complete.

Is there some kind of weird limitation of doing what I'm doing? I'd prefer not to have a task within my SPI flash module, and would rather rely on the callbacks to drive everything for simplicity and maximum throughput.

Any help would be greatly appreciated!

Outcomes