<?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 DMA to UART communication random behavior in S32K</title>
    <link>https://community.nxp.com/t5/S32K/DMA-to-UART-communication-random-behavior/m-p/1015309#M6172</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am trying to use DMA to send and recieve from UART. I configured the DMA successfully and also see the recieved data in the SRAM. But the recieved data is very inconsistent. Sometimes I recieve garbage value in the first four bytes and then the correct data. Sometimes I recieve at the correct location but data recieved is incorrect. Some other times I recieve correct data. What is the reason for this random behaviour?&lt;/P&gt;&lt;P&gt;I use the function "&amp;nbsp;LPUART_DRV_ReceiveData"&amp;nbsp; which in turn uses&amp;nbsp;LPUART_DRV_StartReceiveDataUsingDma and&amp;nbsp;EDMA_DRV_ConfigMultiBlockTransfer. Should I make any changes in configMultiBlocktransfer function?&lt;/P&gt;&lt;P&gt;Or is this memory mapping issue?&lt;/P&gt;&lt;P&gt;I use blocking send and non-blocking recieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also when I recieve correctly DMA stays in rxBusy state continuously. How can I make the DMA Rx channel get out of busy state?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is using Blocking UART better? When I use blocking UART I dont recieve at all. Does this mean I am doing something wrong in configuration altogether? I know this is a lot of questions and very chaotic but thats how the functionality is behaving too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jan 2020 14:20:19 GMT</pubDate>
    <dc:creator>c_joshi</dc:creator>
    <dc:date>2020-01-29T14:20:19Z</dc:date>
    <item>
      <title>DMA to UART communication random behavior</title>
      <link>https://community.nxp.com/t5/S32K/DMA-to-UART-communication-random-behavior/m-p/1015309#M6172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am trying to use DMA to send and recieve from UART. I configured the DMA successfully and also see the recieved data in the SRAM. But the recieved data is very inconsistent. Sometimes I recieve garbage value in the first four bytes and then the correct data. Sometimes I recieve at the correct location but data recieved is incorrect. Some other times I recieve correct data. What is the reason for this random behaviour?&lt;/P&gt;&lt;P&gt;I use the function "&amp;nbsp;LPUART_DRV_ReceiveData"&amp;nbsp; which in turn uses&amp;nbsp;LPUART_DRV_StartReceiveDataUsingDma and&amp;nbsp;EDMA_DRV_ConfigMultiBlockTransfer. Should I make any changes in configMultiBlocktransfer function?&lt;/P&gt;&lt;P&gt;Or is this memory mapping issue?&lt;/P&gt;&lt;P&gt;I use blocking send and non-blocking recieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also when I recieve correctly DMA stays in rxBusy state continuously. How can I make the DMA Rx channel get out of busy state?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is using Blocking UART better? When I use blocking UART I dont recieve at all. Does this mean I am doing something wrong in configuration altogether? I know this is a lot of questions and very chaotic but thats how the functionality is behaving too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2020 14:20:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/DMA-to-UART-communication-random-behavior/m-p/1015309#M6172</guid>
      <dc:creator>c_joshi</dc:creator>
      <dc:date>2020-01-29T14:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: DMA to UART communication random behavior</title>
      <link>https://community.nxp.com/t5/S32K/DMA-to-UART-communication-random-behavior/m-p/1015310#M6173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/c.joshi@spike.global"&gt;c.joshi@spike.global&lt;/A&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hard to say.&lt;/P&gt;&lt;P&gt;Could you attached a test project?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;BR, Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2020 13:41:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/DMA-to-UART-communication-random-behavior/m-p/1015310#M6173</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-01-30T13:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: DMA to UART communication random behavior</title>
      <link>https://community.nxp.com/t5/S32K/DMA-to-UART-communication-random-behavior/m-p/1015311#M6174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your prompt response but due to some security reasons , I cannot attach the project. Fortunately I have been able to find some workaround.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am now clearing the destination buffer before receiving and i am getting the correct data. But I get the correct data after looping through the send and receive 2-3 times.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the reason can be that the data is not available yet but DMA is transferring(junk data) anyway.&lt;/P&gt;&lt;P&gt;Now, How can I make DMA wait untill it receives the correct data from LPUART and then transfer it to destination buffer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;Chandrika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2020 13:52:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/DMA-to-UART-communication-random-behavior/m-p/1015311#M6174</guid>
      <dc:creator>c_joshi</dc:creator>
      <dc:date>2020-01-30T13:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: DMA to UART communication random behavior</title>
      <link>https://community.nxp.com/t5/S32K/DMA-to-UART-communication-random-behavior/m-p/1015312#M6175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Chandrika,&lt;/P&gt;&lt;P&gt;If the DMA trigger is the Receive Data Register Full Flag (RDRF), it triggers only of the data are received. &lt;BR /&gt;But the number of datawords available in the buffer when RDRF is set depends on the WATER[RXWATER] value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2020 14:08:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/DMA-to-UART-communication-random-behavior/m-p/1015312#M6175</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-01-31T14:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: DMA to UART communication random behavior</title>
      <link>https://community.nxp.com/t5/S32K/DMA-to-UART-communication-random-behavior/m-p/1015313#M6176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please elaborate your answer? I have not changed anything wrt the RDRF or&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;WATER[RXWATER]. Probably using the default values.&amp;nbsp; Can you tell me how it effects and what should I be changing in my code?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 16:39:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/DMA-to-UART-communication-random-behavior/m-p/1015313#M6176</guid>
      <dc:creator>c_joshi</dc:creator>
      <dc:date>2020-02-04T16:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: DMA to UART communication random behavior</title>
      <link>https://community.nxp.com/t5/S32K/DMA-to-UART-communication-random-behavior/m-p/1015314#M6177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Hi&amp;nbsp;Chandrika,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I was reacting to this: "&lt;SPAN&gt;I think the reason can be that the data is not available yet but DMA is transferring(junk data) anyway.&lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Because the RDRF flag is a DMA trigger but it depends on the DMA configuration how many bytes is transferred on a single trigger. The RXWATER value specifies&amp;nbsp;how many datawords are&amp;nbsp;in the RX FIFO when the RDRF flag is set.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I believe it is explained in the RM.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I haven't seen the code, hard to say.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Daniel&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2020 12:37:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/DMA-to-UART-communication-random-behavior/m-p/1015314#M6177</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-02-07T12:37:01Z</dc:date>
    </item>
  </channel>
</rss>

