2015-10-09 11:03 AM
Is it important how to set priorities for TX and RX DMA channels for SPI?
Thanks #spi-dma2015-10-10 11:49 PM
2015-10-11 04:44 AM
If you yet the same priority to both, then lower stream number has higher priority.
But if there would be need for that (never has this trouble) I would set RX to higher priority. Why?If data is ready from SPI to memory, RX should transmit this faster then TX DMA fill another SPI. In this case, you can't miss any data.But DMA uses FIFO also so somehow there is no need to worry about that.2015-10-11 12:49 PM
2015-10-12 04:58 AM
In master mode to avoid an RX overrun condition the RX DMA should be at a higher priority than TX. TX also clocks in RX data so the RX data register has to be clear.
In slave mode the remote master will clock both RX and TX so the TX data register has to be loaded in advance of the first byte arriving. For this case you will want the TX priority to be higher than RX. Jack Peacock