<?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: DSPI transfer using DMA in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/DSPI-transfer-using-DMA/m-p/661662#M7307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Peter and thank you for your answer.&lt;/P&gt;&lt;P&gt;I've had a look to the examples and I've tried to set a transfer with the following configuration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input source buffer (src) has a size of N*2 bytes&lt;/P&gt;&lt;P&gt;DMA configuration:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; SADDR : src&lt;BR /&gt;&amp;nbsp; &amp;nbsp; SLAST : src + N*2&lt;BR /&gt;&amp;nbsp; &amp;nbsp; SOFF : 2&lt;BR /&gt;&amp;nbsp; &amp;nbsp; DADDR : 0xFBE78036 (PUSHR register + 2)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; DLASTSGA : = DADDR&lt;BR /&gt;&amp;nbsp; &amp;nbsp; DOFF : 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ATTR : 0x0101 =&amp;gt; source buffer is 16bits and destination buffer is 16bits&lt;BR /&gt;&amp;nbsp; &amp;nbsp; NBYTES.MLNO : 2&lt;BR /&gt;&amp;nbsp; &amp;nbsp; BITER.ELINKNO = CITER.ELINKNO = N&lt;/P&gt;&lt;P&gt;SPI configuration:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; MCR.XPI = 1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; CTARE.DTCP = N*2&lt;BR /&gt;&amp;nbsp; &amp;nbsp; CTARE.FMSZE = 1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; CTAR.FMSZ = 0xF&lt;/P&gt;&lt;P&gt;Unfortunately, it seems that the frame sent is not correct.&lt;/P&gt;&lt;P&gt;The expected data to be sent is for example 0xabcdef99 followed by 0x12345678 and the observed sent frame is&lt;/P&gt;&lt;P&gt;0xAB 0xCD 0x00 0x00 0x12 0x34 0xEF 0x99 ...&lt;/P&gt;&lt;P&gt;Have you any idea of what is the mistake in the upper configuration ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paulo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Mar 2017 10:37:22 GMT</pubDate>
    <dc:creator>paulodasilvapin</dc:creator>
    <dc:date>2017-03-22T10:37:22Z</dc:date>
    <item>
      <title>DSPI transfer using DMA</title>
      <link>https://community.nxp.com/t5/MPC5xxx/DSPI-transfer-using-DMA/m-p/661660#M7305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your sampling code for a DSPI driver ( MPC5777M DSPI_SimpleTXRX S32DS)&lt;/P&gt;&lt;P&gt;Is it possible to provide also an example or tips to use DMA &amp;nbsp;to fill the TX FIFO ? In particular, is it possible to fill the TX command part of the PUSHR register only one time and then fill the TX data part of this register with DMA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;Paulo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2017 08:50:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/DSPI-transfer-using-DMA/m-p/661660#M7305</guid>
      <dc:creator>paulodasilvapin</dc:creator>
      <dc:date>2017-03-17T08:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: DSPI transfer using DMA</title>
      <link>https://community.nxp.com/t5/MPC5xxx/DSPI-transfer-using-DMA/m-p/661661#M7306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paulo,&lt;/P&gt;&lt;P&gt;Yes, it is possible to initialize PUSHR register by SW and then use DMA for loading any additional data into this register.&lt;/P&gt;&lt;P&gt;There is actually not a specific example for this case, however you can have a look at &lt;A href="https://community.nxp.com/docs/DOC-329623"&gt;MPC5 software example list&lt;/A&gt; and use MPC5744P or MPC5775K DMA example or any other of MPC57xx.\&lt;/P&gt;&lt;P&gt;There is already posted MPC5775K DMA example for S32DS by Martin Kovar.&lt;/P&gt;&lt;P&gt;Just have a look on it, take AIPS and DMA initialization routines and use them for your project. This should be smooth and without any additional effort.&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 14:00:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/DSPI-transfer-using-DMA/m-p/661661#M7306</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2017-03-20T14:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: DSPI transfer using DMA</title>
      <link>https://community.nxp.com/t5/MPC5xxx/DSPI-transfer-using-DMA/m-p/661662#M7307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Peter and thank you for your answer.&lt;/P&gt;&lt;P&gt;I've had a look to the examples and I've tried to set a transfer with the following configuration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input source buffer (src) has a size of N*2 bytes&lt;/P&gt;&lt;P&gt;DMA configuration:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; SADDR : src&lt;BR /&gt;&amp;nbsp; &amp;nbsp; SLAST : src + N*2&lt;BR /&gt;&amp;nbsp; &amp;nbsp; SOFF : 2&lt;BR /&gt;&amp;nbsp; &amp;nbsp; DADDR : 0xFBE78036 (PUSHR register + 2)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; DLASTSGA : = DADDR&lt;BR /&gt;&amp;nbsp; &amp;nbsp; DOFF : 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ATTR : 0x0101 =&amp;gt; source buffer is 16bits and destination buffer is 16bits&lt;BR /&gt;&amp;nbsp; &amp;nbsp; NBYTES.MLNO : 2&lt;BR /&gt;&amp;nbsp; &amp;nbsp; BITER.ELINKNO = CITER.ELINKNO = N&lt;/P&gt;&lt;P&gt;SPI configuration:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; MCR.XPI = 1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; CTARE.DTCP = N*2&lt;BR /&gt;&amp;nbsp; &amp;nbsp; CTARE.FMSZE = 1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; CTAR.FMSZ = 0xF&lt;/P&gt;&lt;P&gt;Unfortunately, it seems that the frame sent is not correct.&lt;/P&gt;&lt;P&gt;The expected data to be sent is for example 0xabcdef99 followed by 0x12345678 and the observed sent frame is&lt;/P&gt;&lt;P&gt;0xAB 0xCD 0x00 0x00 0x12 0x34 0xEF 0x99 ...&lt;/P&gt;&lt;P&gt;Have you any idea of what is the mistake in the upper configuration ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paulo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 10:37:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/DSPI-transfer-using-DMA/m-p/661662#M7307</guid>
      <dc:creator>paulodasilvapin</dc:creator>
      <dc:date>2017-03-22T10:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: DSPI transfer using DMA</title>
      <link>https://community.nxp.com/t5/MPC5xxx/DSPI-transfer-using-DMA/m-p/661663#M7308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Why would you do 2x*16-bit transfers?&lt;/P&gt;&lt;P&gt;The PUSHR register is 32-bit.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/16482i7733F2AC2C01E73D/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You have to use 32-bit writes. Otherwise you will send out data with unknown command (chip select, timing, etc..)&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Mar 2017 08:15:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/DSPI-transfer-using-DMA/m-p/661663#M7308</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2017-03-23T08:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: DSPI transfer using DMA</title>
      <link>https://community.nxp.com/t5/MPC5xxx/DSPI-transfer-using-DMA/m-p/661664#M7309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Peter,&lt;/P&gt;&lt;P&gt;I've supposed that having set one time the PUSHR TX command field before doing the DMA transfer, then I need only to write my data into the TX data field which&amp;nbsp;have&amp;nbsp;a size of&amp;nbsp;16bits. My understanding is that if I make a 32 bits transfer with DMA then the TX command field is overwritten at each cycle.&lt;/P&gt;&lt;P&gt;My goal is to set once the TX command field and then do the DMA transfer for performances. Otherwise, I need to perform first a "for loop" to copy my data into a buffer buff containing the TX command and the TX data and then transfer this buffer buff by DMA using 32 bits transfer which already works in my application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Paulo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Mar 2017 09:03:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/DSPI-transfer-using-DMA/m-p/661664#M7309</guid>
      <dc:creator>paulodasilvapin</dc:creator>
      <dc:date>2017-03-23T09:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: DSPI transfer using DMA</title>
      <link>https://community.nxp.com/t5/MPC5xxx/DSPI-transfer-using-DMA/m-p/661665#M7310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Honestly this is an application problem.&lt;/P&gt;&lt;P&gt;You have to write to PUSHR register full 32-bits each time.&lt;/P&gt;&lt;P&gt;If you use SW for buffer preparation or another DMA channel, this is on you.&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Mar 2017 09:14:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/DSPI-transfer-using-DMA/m-p/661665#M7310</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2017-03-23T09:14:51Z</dc:date>
    </item>
  </channel>
</rss>

