SPI - DMA Tx and Rx priorities
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-10-09 11:03 AM
Posted on October 09, 2015 at 20:03
Is it important how to set priorities for TX and RX DMA channels for SPI?
Thanks #spi-dma
Labels:
- Labels:
-
SPI
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-10-10 11:49 PM
Posted on October 11, 2015 at 08:49Nobody knows?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-10-11 4:44 AM
Posted on October 11, 2015 at 13:44
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.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-10-11 12:49 PM
Posted on October 11, 2015 at 21:49Thanks Tilen.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-10-12 4:58 AM
Posted on October 12, 2015 at 13:58
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