<?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: S32K312 _UART_DMA_Data_Loss in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K312-UART-DMA-Data-Loss/m-p/1553037#M18847</link>
    <description>&lt;P&gt;Hi Liek,&lt;/P&gt;
&lt;P&gt;After testing, you can use below code to replace the AbortReceivingData( ) function and UartReceivingData function to reduce the gap. And I attached a dual buffer example with S32K344 and lower version RTD for your reference, it can be easily migrate to RTD2.0.1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Enable LPUART0 idle receiving */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IP_LPUART_0-&amp;gt;CTRL |= LPUART_CTRL_ILIE(1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Lpuart_Uart_Ip_SetRxBuffer(INST_LPUART4, uart4_DMA_recv_buffer1, RX_BUFFER_SIZE);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; /*reset the Buffer address to DMA as well.*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IP_TCD-&amp;gt;TCD1_DADDR = uart4_DMA_recv_buffer1; /*in my code TCD1 is used for UART RX, please choose the right TCD in your application*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IP_TCD-&amp;gt;CITER1.TCD1_CITER_ELINKNO = RX_BUFFER_SIZE;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
    <pubDate>Mon, 14 Nov 2022 07:15:00 GMT</pubDate>
    <dc:creator>Jeremy_He</dc:creator>
    <dc:date>2022-11-14T07:15:00Z</dc:date>
    <item>
      <title>S32K312 _UART_DMA_Data_Loss</title>
      <link>https://community.nxp.com/t5/S32K/S32K312-UART-DMA-Data-Loss/m-p/1553026#M18846</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;My customer is developing T-box. They use uart to communicate with a 5G module, and meet an issue. The 5G module continuesly sends data with UART in a very shot interval, about 1-2ms, 230400bps. Then we will see severe&amp;nbsp; frame will lost.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Here we can see the function call:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiekLi_0-1668408015735.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/200155iBCABCC8CFCAD7CD6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiekLi_0-1668408015735.jpeg" alt="LiekLi_0-1668408015735.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiekLi_1-1668408030506.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/200156i74815990A7F6AF67/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiekLi_1-1668408030506.jpeg" alt="LiekLi_1-1668408030506.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Seems in the uart IDLE irq, the RTD low level code will stop the DMA and receiving, then open it again. This mechanism will create a receiving gap, during this gap, the DMA cannot receive data. So if the sending interval is too short, it may lose frames.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SDK we used is&amp;nbsp;&amp;nbsp;S32K3_RTD_2_0_0_D2203_ASR_REL_4_4_REV_0000_20220331.&lt;/P&gt;
&lt;P&gt;Do we have some demo code to handle the UART DMA receiving with ping-pang buffer?&lt;/P&gt;
&lt;P&gt;Thanks very much for support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liek&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 06:57:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312-UART-DMA-Data-Loss/m-p/1553026#M18846</guid>
      <dc:creator>LiekLi</dc:creator>
      <dc:date>2022-11-14T06:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: S32K312 _UART_DMA_Data_Loss</title>
      <link>https://community.nxp.com/t5/S32K/S32K312-UART-DMA-Data-Loss/m-p/1553037#M18847</link>
      <description>&lt;P&gt;Hi Liek,&lt;/P&gt;
&lt;P&gt;After testing, you can use below code to replace the AbortReceivingData( ) function and UartReceivingData function to reduce the gap. And I attached a dual buffer example with S32K344 and lower version RTD for your reference, it can be easily migrate to RTD2.0.1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Enable LPUART0 idle receiving */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IP_LPUART_0-&amp;gt;CTRL |= LPUART_CTRL_ILIE(1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Lpuart_Uart_Ip_SetRxBuffer(INST_LPUART4, uart4_DMA_recv_buffer1, RX_BUFFER_SIZE);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; /*reset the Buffer address to DMA as well.*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IP_TCD-&amp;gt;TCD1_DADDR = uart4_DMA_recv_buffer1; /*in my code TCD1 is used for UART RX, please choose the right TCD in your application*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IP_TCD-&amp;gt;CITER1.TCD1_CITER_ELINKNO = RX_BUFFER_SIZE;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 07:15:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312-UART-DMA-Data-Loss/m-p/1553037#M18847</guid>
      <dc:creator>Jeremy_He</dc:creator>
      <dc:date>2022-11-14T07:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: S32K312 _UART_DMA_Data_Loss</title>
      <link>https://community.nxp.com/t5/S32K/S32K312-UART-DMA-Data-Loss/m-p/1557016#M18982</link>
      <description>Hello Jeremy,&lt;BR /&gt;&lt;BR /&gt;Thanks very much for your support, it works.</description>
      <pubDate>Mon, 21 Nov 2022 08:14:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312-UART-DMA-Data-Loss/m-p/1557016#M18982</guid>
      <dc:creator>LiekLi</dc:creator>
      <dc:date>2022-11-21T08:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: S32K312 _UART_DMA_Data_Loss</title>
      <link>https://community.nxp.com/t5/S32K/S32K312-UART-DMA-Data-Loss/m-p/1626369#M21789</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/200655"&gt;@LiekLi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How many bytes is the DMA transmission? I use dma transmission, 100ms to send 100 bytes once, can not enter the send completion interrupt, is it normal?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 09:36:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312-UART-DMA-Data-Loss/m-p/1626369#M21789</guid>
      <dc:creator>guochuan</dc:creator>
      <dc:date>2023-04-01T09:36:58Z</dc:date>
    </item>
  </channel>
</rss>

