<?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: K64: How to Initiate 2-frame SPI transfer from DMA? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-How-to-Initiate-2-frame-SPI-transfer-from-DMA/m-p/611398#M36161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="288164" data-username="davenadler" href="https://community.nxp.com/people/davenadler"&gt;Dave Nadler&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Please check the KSDK for K64 &amp;nbsp;in boards&amp;gt;frdmk64f&amp;gt;driver_examples&amp;gt;dspi&amp;gt;edma_transfer&lt;/P&gt;&lt;P&gt;&amp;nbsp;there is an example. &amp;nbsp;soy you can see the process.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuxpresso.nxp.com/en/welcome" title="https://mcuxpresso.nxp.com/en/welcome"&gt;Welcome to MCUXpresso | MCUXpresso Config Tools&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if you have more questions.&lt;/P&gt;&lt;P&gt;have a great day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jan 2017 16:28:54 GMT</pubDate>
    <dc:creator>Jonathan_Iglesias</dc:creator>
    <dc:date>2017-01-16T16:28:54Z</dc:date>
    <item>
      <title>K64: How to Initiate 2-frame SPI transfer from DMA?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-How-to-Initiate-2-frame-SPI-transfer-from-DMA/m-p/611397#M36160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As part of a set of DMA processing that generates various excitation and control signals, we need to initiate an SPI master transfer of two 16-bit words. The SPI slave device actually has a single 18-bit frame, so we'll just use two 16-bit frames from K64 (16-bit is maximum length K64 SPI supports for master transfer), and ignore the extra 14 bits clocked in on receive. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First try: SPI2 has a 1-deep FIFO, and the documentation implies that a frame is immediately moved from FIFO to shift register if you write to PUSHR while SPI is not running (while shift register is empty). So, I though just use DMA to write two 32-bit words to PUSHR (first should immediately transfer into shift register, second sits in FIFO til first is shifted out). Unfortunately, 2nd word is ignored and I only see one 16-bit transfer on the scope, aarrggg... Note: SPI DMA request is used to transfer RX data into a buffer; this part works OK (except only first 16-bits of data ever received).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, how to start a two-word transfer to SPI via DMA (no ISRs etc, DMA only)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help,&lt;BR /&gt;Best Regards, Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2017 15:20:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-How-to-Initiate-2-frame-SPI-transfer-from-DMA/m-p/611397#M36160</guid>
      <dc:creator>davenadler</dc:creator>
      <dc:date>2017-01-12T15:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: K64: How to Initiate 2-frame SPI transfer from DMA?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-How-to-Initiate-2-frame-SPI-transfer-from-DMA/m-p/611398#M36161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="288164" data-username="davenadler" href="https://community.nxp.com/people/davenadler"&gt;Dave Nadler&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Please check the KSDK for K64 &amp;nbsp;in boards&amp;gt;frdmk64f&amp;gt;driver_examples&amp;gt;dspi&amp;gt;edma_transfer&lt;/P&gt;&lt;P&gt;&amp;nbsp;there is an example. &amp;nbsp;soy you can see the process.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuxpresso.nxp.com/en/welcome" title="https://mcuxpresso.nxp.com/en/welcome"&gt;Welcome to MCUXpresso | MCUXpresso Config Tools&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if you have more questions.&lt;/P&gt;&lt;P&gt;have a great day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2017 16:28:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-How-to-Initiate-2-frame-SPI-transfer-from-DMA/m-p/611398#M36161</guid>
      <dc:creator>Jonathan_Iglesias</dc:creator>
      <dc:date>2017-01-16T16:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: K64: How to Initiate 2-frame SPI transfer from DMA?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-How-to-Initiate-2-frame-SPI-transfer-from-DMA/m-p/611399#M36162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan, but unfortunately I had previously read this example and it is quite unhelpful. SPI is a full-duplex device, and this example seems to use two separate SPI peripherals, each in half-duplex! My use-case is a far more typical SPI scenario (in fact, required for two different SPI peripherals in a current project) as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On a DMA request, send 2 words to SPI1 &lt;SPAN style="text-decoration: underline;"&gt;while simultaneously receiving&lt;/SPAN&gt; 2 words from SPI1 into a buffer. Sometime later, on the next DMA request, again send (the same) 2 control words while receiving the next 2 words into the next &lt;SPAN style="text-decoration: underline;"&gt;sequential&lt;/SPAN&gt; positions in the buffer. Repeat the process until the buffer is filled up (for example 1024 two-word transfers completed). DMA requests come from either a timer or a DMA-link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an extremely common use case for reading an SPI sensor, ADC, etc on a timer - unlike the rather strange example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help,&lt;BR /&gt;Best Regards, Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 15:48:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-How-to-Initiate-2-frame-SPI-transfer-from-DMA/m-p/611399#M36162</guid>
      <dc:creator>davenadler</dc:creator>
      <dc:date>2017-01-30T15:48:56Z</dc:date>
    </item>
  </channel>
</rss>

