<?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>S32KのトピックCan DMA of slave SPI read transfer terminate on transfer complete</title>
    <link>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852054#M3556</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;I’m using s32k148 and configured an spi slave channel with dma transfer. It looks like I have to know in advance the length of data to be received. If I try to set it to receive some max buffer size value and the spi master sends less data, the slave continues the dma read to the full count I specified filling the rest of the buffer with garbage (in other words – it continues to read even after the CS signal from the master went inactive). Is this&amp;nbsp;a bug or a feature? Or did I miss something?&lt;BR /&gt;&lt;BR /&gt;Freddy&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Mar 2019 00:40:28 GMT</pubDate>
    <dc:creator>freddy_ben-zeev</dc:creator>
    <dc:date>2019-03-13T00:40:28Z</dc:date>
    <item>
      <title>Can DMA of slave SPI read transfer terminate on transfer complete</title>
      <link>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852054#M3556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;I’m using s32k148 and configured an spi slave channel with dma transfer. It looks like I have to know in advance the length of data to be received. If I try to set it to receive some max buffer size value and the spi master sends less data, the slave continues the dma read to the full count I specified filling the rest of the buffer with garbage (in other words – it continues to read even after the CS signal from the master went inactive). Is this&amp;nbsp;a bug or a feature? Or did I miss something?&lt;BR /&gt;&lt;BR /&gt;Freddy&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2019 00:40:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852054#M3556</guid>
      <dc:creator>freddy_ben-zeev</dc:creator>
      <dc:date>2019-03-13T00:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can DMA of slave SPI read transfer terminate on transfer complete</title>
      <link>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852055#M3557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Freddy Ben-Zeev&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DMA request is triggered by the Receive Data Flag, and this flag is set only when the level in RXWATER has been reached, if there isn't clock by the master, then the fifo should not be filled and then it shouldn't trigger the DMA transfer. How do you configure the LPSPI FIFO? and what is the trigger of your DMA? could you verify that the Receive data flag is set only once?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2019 00:39:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852055#M3557</guid>
      <dc:creator>jorge_a_vazquez</dc:creator>
      <dc:date>2019-03-19T00:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can DMA of slave SPI read transfer terminate on transfer complete</title>
      <link>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852056#M3558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RXWATER is still count based. SPI transfer ends when the CS signal goes inactive - shouldn't there be an option to stop the transfer at this point?&lt;BR /&gt;At this point I don't program those flags directly - I use the SDK from NXP - butmy impression is that the limitation in this case is in the h/w design.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2019 01:08:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852056#M3558</guid>
      <dc:creator>freddy_ben-zeev</dc:creator>
      <dc:date>2019-03-19T01:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can DMA of slave SPI read transfer terminate on transfer complete</title>
      <link>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852057#M3559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class=""&gt;Hi Freddy Ben-Zeev &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Receive Data Flag should not be set if you have not received all the data in the fifo buffer, and the module will not be enabled if the CS is inactive (even if there is a clock in the line).&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I recommend you to check the example code of the SDK, there is a lpspi_dma example code that uses master and slave, it could help you in your implementation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 18:59:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852057#M3559</guid>
      <dc:creator>jorge_a_vazquez</dc:creator>
      <dc:date>2019-03-26T18:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can DMA of slave SPI read transfer terminate on transfer complete</title>
      <link>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852058#M3560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you understood what I was asking...&lt;BR /&gt; Normally (or at least in many cases) an SPI transaction starts with CS going active and terminates with it going inactive - controlled by the master. When using DMA to read the received data on the slave it would be nice if the DMA can terminate when this happens. Unfortunately it seem&amp;nbsp;that the slave in this MCU assumes that "all the data" is always the count of bytes programmed into the DMA controller. In many cases that I worked with in the past "all the data" meant the data from CS going active to CS going inactive - because the slave SPI&amp;nbsp;did not know how many bytes will be in this range. Some DMA controllers I worked could use the CS going inactive as a terminating signal. Here it does not seem to be possible.&lt;BR /&gt;&lt;BR /&gt;This gives me the two alternatives (which I don't like) to have a higher level protocol telling the SPI slave how many bytes to expect, or receiving always some maximum number of bytes and embed in the data the actual count. Both options are somewhat of a "hack"...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Freddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 20:39:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852058#M3560</guid>
      <dc:creator>freddy_ben-zeev</dc:creator>
      <dc:date>2019-03-26T20:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can DMA of slave SPI read transfer terminate on transfer complete</title>
      <link>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852059#M3561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Freddy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on your comments I suppose that you are using SDK drivers. They are designed to specifies the length of the buffers when transfer is started.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I know the DMA shouldn't read dummy thinks because&amp;nbsp; when RX fifo is empty due to the lack of data&amp;nbsp; from master side LPSPI doesn't send any request to DMA channel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you show me how do you use SDK drivers in your application?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Razvan&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2019 13:33:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852059#M3561</guid>
      <dc:creator>razva_tilimpea</dc:creator>
      <dc:date>2019-03-28T13:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can DMA of slave SPI read transfer terminate on transfer complete</title>
      <link>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852060#M3562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Razvan.&lt;BR /&gt;&lt;BR /&gt;Good news and bad news... You're right (and I was mistaken) that if the master sends less data than the slave expects the slave will not receive garbage as I wrote in my original question (I don't know why I thought so...). But the bad news (for me) - it will continue to wait for data until it times out or forever in my case. It does not have&amp;nbsp;the option to terminate the DMA at the end of&amp;nbsp;one SPI transaction (when CS goes inactive) which is what I'd like to do. This does not seem to be SDK issue but h/w issue.&lt;BR /&gt;&lt;BR /&gt;Freddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2019 17:36:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852060#M3562</guid>
      <dc:creator>freddy_ben-zeev</dc:creator>
      <dc:date>2019-03-28T17:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can DMA of slave SPI read transfer terminate on transfer complete</title>
      <link>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852061#M3563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Freddy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, the hardware was designed in a different way, but I think you can do a workaround.&lt;/P&gt;&lt;P&gt;Can you connect CS to an GPIO and configure it to detect inactive state and to generate interrupt. In interrupt handler you can call abort transfer function for lpspi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Razvan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2019 06:31:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852061#M3563</guid>
      <dc:creator>razva_tilimpea</dc:creator>
      <dc:date>2019-03-29T06:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can DMA of slave SPI read transfer terminate on transfer complete</title>
      <link>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852062#M3564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is what I thought. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2019 16:35:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852062#M3564</guid>
      <dc:creator>freddy_ben-zeev</dc:creator>
      <dc:date>2019-03-29T16:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can DMA of slave SPI read transfer terminate on transfer complete</title>
      <link>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852063#M3565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi! have you solved your problem? Similarly,&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I had a problem with using spi's dma mode for host and slave communication. I did not use the SDK, but directly read and write registers when programming. In the following code,&amp;nbsp; I tried to use s32k116&amp;nbsp;that&amp;nbsp;was set as a slave device to&amp;nbsp; communicate with the external spi host device,however, While the host&amp;nbsp; keeps sending 128 bytes of data, the slave DmaA receive&amp;nbsp;interrupt could not be triggered，so I could not receive or send any data. could you help me find out where the problem is? Thank you very much.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2020 06:27:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Can-DMA-of-slave-SPI-read-transfer-terminate-on-transfer/m-p/852063#M3565</guid>
      <dc:creator>vanaua</dc:creator>
      <dc:date>2020-05-20T06:27:52Z</dc:date>
    </item>
  </channel>
</rss>

