Spark Logic

Non blocking SPI DMA – Added callback to the SPI DMA functions (dmaSend, dmaTransfer…)

victor_pv Tue Feb 21, 2017 8:05 pm

UPDATE:
Working code in this post, and an explanation how to modify sdFat to use it in the next post after that:
http://www.stm32duino.com/viewtopic.php … =60#p30306

======================================================

This is something Roger has suggested several times, and it seems to only make sense.

Currently the dma TX/RX functions we added to the SPI library block until the DMA transfer is completed or has timed out.
This change would add 2 functions to the SPI library, similar to the Arduino official I2S library:

onTransmit(handler);
onReceive(handler);

Replies

victor_pv Tue Aug 01, 2017 3:58 pm

[RogerClark – Mon Jul 31, 2017 10:30 pm] –
Would benefit from a function that does a dma Read, but does not care what is transmitted.

Roger see my post above. The dmaTransfer function can already do that if the transmitBuf parameter is passed as 0. In that case it sends FF while receiving to the rx buffer.
We will add the MINC feature so the value sent can be selected by the user with a variable.

RogerClark Tue Aug 01, 2017 9:26 pm

Thanks victor

I will need to test that, when I have time, on a ili9341 display

Sign in to reply