You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a design for SPI with DMA on atsamd51.
I think we'll always want to use DMA. That is an easier to use API and likely faster overall. #1176 (comment)
Tx() to always use dma if possible, but at least atsamd51 slows things down in some cases.
If the data is small or the communication speed is slow, using DMA will slow down spi.Tx().
To reduce the slowdown, I am considering implementing the following.
If anyone has any opinions, please let me know.
// The following will be executed with blocking as before// The internal implementation will be the same as before, without DMA.spi.Tx(w, r)
// The following will be executed using DMA.// It will always run asynchronously and can wait for completion by calling spi.spi.TxDMA(w, r)
spi.Wait()
The text was updated successfully, but these errors were encountered:
D6 (Channel 6) below is the processing time for spi.Tx() / spi.TxDMA().
When using DMA, about 2.5us of time is needed to prepare for the transfer.
However, after 2.5us has elapsed, the DMA will execute, allowing you to perform other operations.
I checked several lengths, and it seems that using DMA is not a problem when the length is 32 bytes or more.
I am working on a design for SPI with DMA on atsamd51.
Tx() to always use dma if possible, but at least atsamd51 slows things down in some cases.
If the data is small or the communication speed is slow, using DMA will slow down spi.Tx().
To reduce the slowdown, I am considering implementing the following.
If anyone has any opinions, please let me know.
The text was updated successfully, but these errors were encountered: