<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: i.MX8M Mini - Can spidev use DMA? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Mini-Can-spidev-use-DMA/m-p/1074671#M157777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the example, Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this still does not indicate whether spidev is actually going to use DMA or not.&amp;nbsp; How can I tell if spidev is using DMA for SPI transfers, rather than programmed I/O transfers?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There does not appear to be any ioctl() or other call available from spidev to set up a DMA transfer vs. any other type of transfer, so how can I prove that transfers are taking place using DMA?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jul 2020 12:38:55 GMT</pubDate>
    <dc:creator>surrealist14</dc:creator>
    <dc:date>2020-07-23T12:38:55Z</dc:date>
    <item>
      <title>i.MX8M Mini - Can spidev use DMA?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Mini-Can-spidev-use-DMA/m-p/1074669#M157775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NXP community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using an i.MX8M Mini to communicate with a TI ADS1299 EEG Analog Front end.&amp;nbsp; The data acquisition rate of the ADS1299 can be programmed, and we typically run it at 8K samples/second.&amp;nbsp; This will cause a new batch of data to be available every 125 usec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have Linux configured to create /dev/spidev0.0, which uses a GPIO for the chip select.&amp;nbsp; I have the DRDY# interrupt from the ADS1299 connected to another GPIO input, and I am using libgpiod to detect and respond to interrupts.&amp;nbsp; However, it appears that we sometimes miss interrupts and therefore miss data.&amp;nbsp; My criteria for this is that the time between the previous interrupt and the latest interrupt is &amp;gt;250 usec, since we should receive an interrupt every 125 usec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When an interrupt occurs, I have to read 27 bytes of data from the ADS1299, which includes 3 status bytes, plus 3 * 8 channels * 3 bytes/channel of ADC data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can spidev be configured to use DMA for this data transfer?&amp;nbsp; It's unclear to me how the /dev/spidev0.0 driver connects to the underlying spi-imx driver.&amp;nbsp; On Linux Warrior, I did not see any ioctl() calls available for spidev that would allow me to control DMA.&amp;nbsp; I am not sure if this has changed for Linux Zeus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your advice.&amp;nbsp; I have been trying to do this from user space since I am not familiar with writing kernel mode drivers, and don't even know if a kernel mode driver would help prevent missing interrupts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2020 17:35:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Mini-Can-spidev-use-DMA/m-p/1074669#M157775</guid>
      <dc:creator>surrealist14</dc:creator>
      <dc:date>2020-07-22T17:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8M Mini - Can spidev use DMA?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Mini-Can-spidev-use-DMA/m-p/1074670#M157776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Scott&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can look at ecspi2 "dmas" entries in attached dts files&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2020 00:28:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Mini-Can-spidev-use-DMA/m-p/1074670#M157776</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2020-07-23T00:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8M Mini - Can spidev use DMA?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Mini-Can-spidev-use-DMA/m-p/1074671#M157777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the example, Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this still does not indicate whether spidev is actually going to use DMA or not.&amp;nbsp; How can I tell if spidev is using DMA for SPI transfers, rather than programmed I/O transfers?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There does not appear to be any ioctl() or other call available from spidev to set up a DMA transfer vs. any other type of transfer, so how can I prove that transfers are taking place using DMA?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2020 12:38:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Mini-Can-spidev-use-DMA/m-p/1074671#M157777</guid>
      <dc:creator>surrealist14</dc:creator>
      <dc:date>2020-07-23T12:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8M Mini - Can spidev use DMA?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Mini-Can-spidev-use-DMA/m-p/1074672#M157778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Scott&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dts "dmas" entries ensure that&amp;nbsp;ecspi2 driver uses dma, irrelevant&lt;/P&gt;&lt;P&gt;with spidev or not. Spidev does not use&amp;nbsp;ioctl() DMAs, it is done in ecspi driver.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2020 14:06:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Mini-Can-spidev-use-DMA/m-p/1074672#M157778</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2020-07-23T14:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8M Mini - Can spidev use DMA?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Mini-Can-spidev-use-DMA/m-p/1427029#M188119</link>
      <description>&lt;P&gt;Hi surrealist14,&lt;/P&gt;&lt;P&gt;Were you able to get spi working with dma? Would be able to share code example? I am using MX8M-mini trying to communicate to TI ADS131M08 via SPI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 17:55:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Mini-Can-spidev-use-DMA/m-p/1427029#M188119</guid>
      <dc:creator>nkumar3119</dc:creator>
      <dc:date>2022-03-11T17:55:24Z</dc:date>
    </item>
  </channel>
</rss>

