<?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: UART1 with SDMA IDLE Detection full duplex causes memory overwrite of the TX buffer in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/UART1-with-SDMA-IDLE-Detection-full-duplex-causes-memory/m-p/2097782#M237239</link>
    <description>&lt;P&gt;Hi Daniel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I am using FreeRTOS. Here are the registers USR1 and USR2 of UART1 values:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="okobelnc_0-1747287920782.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/337884i59EE335C27DE8CA4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="okobelnc_0-1747287920782.png" alt="okobelnc_0-1747287920782.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 May 2025 05:46:07 GMT</pubDate>
    <dc:creator>okobelnc</dc:creator>
    <dc:date>2025-05-15T05:46:07Z</dc:date>
    <item>
      <title>UART1 with SDMA IDLE Detection full duplex causes memory overwrite of the TX buffer</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/UART1-with-SDMA-IDLE-Detection-full-duplex-causes-memory/m-p/2095609#M237132</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi, I am using IMX8MN cortex-M7 with SDK 2.16.000. When using UART1 with SDMA in IDLE detection mode, when there is full duplex transfer (TX and RX at the same time), when the SDMA RX callback is called, the beginning of the TX buffer is overwritten (most of the times it is the first byte, but sometimes it is even more than the first byte). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The IDLE condition is set to 4 frames (the shortest period). If the RX received N bytes, the N+1 byte of the RX buffer is overwritten with a value that was not received (I do not know from where), and the same value is written to the beginning of the TX buffer also. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For example, if UART RX received 30 bytes, the 31st byte of the RX buffer is overwritten with a dummy byte, but also the 1st byte of the TX buffer. It happens only for the TX when TX is sent at the same time that RX is done also.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;My configuration of the SDMA is as follow:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN class=""&gt;UART1 TX channel is 6.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;UART1 RX channel is 5.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;UART1 TX channel priority is 4&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;UART1 RX channel priority is 5.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;UART1 TX FIFO watermark is 2.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;UART1 RX FIFO watermark is 1.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;UART1 RTS watermark is 16 (half of the RX FIFO size).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;RX buffer size is 4120 bytes (aligned to 4), while every RX transaction is up to 3090 bytes (actually most of the RX transactions are around ~30 bytes). The same RX buffer is used for every RX transaction (the transactions start from the same memory address).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;TX buffer size is up to 4124 bytes (aligned to 256), while every TX transaction is up to 3093 bytes (actually most of the TX transactions are around ~300 bytes). The same TX buffer is used for every TX transaction (the transactions start from the same memory address). The TX buffer starts with 0xBD byte, and I see that in those scenarios, the 0xBD is replaced by the N+1 byte in the RX buffer.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;What can be the reason for this, and how it can be resolved?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 15:07:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/UART1-with-SDMA-IDLE-Detection-full-duplex-causes-memory/m-p/2095609#M237132</guid>
      <dc:creator>okobelnc</dc:creator>
      <dc:date>2025-05-12T15:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: UART1 with SDMA IDLE Detection full duplex causes memory overwrite of the TX buffer</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/UART1-with-SDMA-IDLE-Detection-full-duplex-causes-memory/m-p/2097633#M237223</link>
      <description>&lt;P&gt;Hi Okobelnc:&lt;/P&gt;
&lt;DIV&gt;Do you use RTOS or bare metal?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Could you please check if there are some error bits in USR1 and USR2&amp;nbsp; state registers when this issue happens?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Regards&lt;/DIV&gt;
&lt;DIV&gt;Daniel&lt;/DIV&gt;</description>
      <pubDate>Thu, 15 May 2025 01:24:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/UART1-with-SDMA-IDLE-Detection-full-duplex-causes-memory/m-p/2097633#M237223</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2025-05-15T01:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: UART1 with SDMA IDLE Detection full duplex causes memory overwrite of the TX buffer</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/UART1-with-SDMA-IDLE-Detection-full-duplex-causes-memory/m-p/2097782#M237239</link>
      <description>&lt;P&gt;Hi Daniel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I am using FreeRTOS. Here are the registers USR1 and USR2 of UART1 values:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="okobelnc_0-1747287920782.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/337884i59EE335C27DE8CA4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="okobelnc_0-1747287920782.png" alt="okobelnc_0-1747287920782.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2025 05:46:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/UART1-with-SDMA-IDLE-Detection-full-duplex-causes-memory/m-p/2097782#M237239</guid>
      <dc:creator>okobelnc</dc:creator>
      <dc:date>2025-05-15T05:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: UART1 with SDMA IDLE Detection full duplex causes memory overwrite of the TX buffer</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/UART1-with-SDMA-IDLE-Detection-full-duplex-causes-memory/m-p/2103993#M237566</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/217570"&gt;@okobelnc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;According to ERR050362 in&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.nxp.com/docs/en/errata/IMX8MN_0N14Y.pdf?_gl=1*1cuhsv2*_ga*MTQxMTg4MTM1NC4xNzIyNjU2NDY4*_ga_WM5LE0KMSH*czE3NDgyMjUyMDgkbzEwMCRnMSR0MTc0ODIyODgyOSRqMCRsMCRoMTI2MzQ3ODc5OA.." target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.nxp.com/docs/en/errata/IMX8MN_0N14Y.pdf&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;, AXI bus may experience error when dealing with unaligned burst writes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may try 64-bit aligned data (e.g. 32 bytes) and see if the issue is gone. If so, make your buffer 64-bit aligned and leave margin between buffers to mitigate the impact.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Daniel&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 03:13:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/UART1-with-SDMA-IDLE-Detection-full-duplex-causes-memory/m-p/2103993#M237566</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2025-05-26T03:13:19Z</dc:date>
    </item>
  </channel>
</rss>

