<?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: [i.MX RT1040 EVK] SAI EDMA Local Loopback Issue: RX buffer data shifted by 4 bytes in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1040-EVK-SAI-EDMA-Local-Loopback-Issue-RX-buffer-data/m-p/2332262#M36360</link>
    <description>&lt;P&gt;solved&lt;BR /&gt;If both the transmitter and receiver use the transmitter bit clock and frame sync:&lt;BR /&gt;• Configure the transmitter for asynchronous operation and the receiver for&lt;BR /&gt;synchronous operation.&lt;BR /&gt;• Enable the receiver in synchronous mode only after both the transmitter and receiver&lt;BR /&gt;are enabled.&lt;BR /&gt;• Enable the transmitter last and disable the tranmitter first.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Mar 2026 07:52:41 GMT</pubDate>
    <dc:creator>nikonz66</dc:creator>
    <dc:date>2026-03-13T07:52:41Z</dc:date>
    <item>
      <title>[i.MX RT1040 EVK] SAI EDMA Local Loopback Issue: RX buffer data shifted by 4 bytes</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1040-EVK-SAI-EDMA-Local-Loopback-Issue-RX-buffer-data/m-p/2331478#M36358</link>
      <description>&lt;P&gt;Hi NXP Team,&lt;/P&gt;&lt;P&gt;I am currently working on the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;official i.MX RT1040 EVK&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and trying to use the SAI interface for custom pure data transfer (not standard audio). To verify my logic, I am performing a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Local Loopback Test&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;by physically shorting the SAI TX and RX pins on the EVK, completely bypassing the external audio codec.&lt;SPAN&gt;I want to use the I2S (SAI) interface as a high-speed communication peripheral for pure data transfer (not standard audio) and encapsulate it into a custom communication driver layer. I am currently in the testing phase verifying the basic logic.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I initialized the SAI to work in classic I2S master mode (generating BCLK and SYNC internally) and used&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;SAI_TransferSendEDMA()&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;SAI_TransferReceiveEDMA()&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;with a buffer size of 128 bytes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When I populate my&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;tx_buffer&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;starting with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;0xAA&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(e.g.,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;[0xAA, 0x01, 0x02, ...]) and start the DMA transfers, the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;rx_buffer&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;receives the data, but&amp;nbsp;the entire payload is shifted by 4 bytes. Specifically:&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;rx_buffer[0]&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;rx_buffer[3]&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;are always&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;0x00.&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp;My actual first byte&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;0xAA&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;appears at&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;rx_buffer[4].&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp;The rest of the data follows sequentially, which means the last 4 bytes of my payload are truncated/lost because the DMA transfer size is strictly 128 bytes.&lt;/P&gt;&lt;P&gt;(Please see the attached Keil debug screenshot showing the tx_buffer and rx_buffer memory windows.)&lt;BR /&gt;Any guidance or reference code would be greatly appreciated. Thank you!&lt;EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 12:09:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1040-EVK-SAI-EDMA-Local-Loopback-Issue-RX-buffer-data/m-p/2331478#M36358</guid>
      <dc:creator>nikonz66</dc:creator>
      <dc:date>2026-03-12T12:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX RT1040 EVK] SAI EDMA Local Loopback Issue: RX buffer data shifted by 4 bytes</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1040-EVK-SAI-EDMA-Local-Loopback-Issue-RX-buffer-data/m-p/2332262#M36360</link>
      <description>&lt;P&gt;solved&lt;BR /&gt;If both the transmitter and receiver use the transmitter bit clock and frame sync:&lt;BR /&gt;• Configure the transmitter for asynchronous operation and the receiver for&lt;BR /&gt;synchronous operation.&lt;BR /&gt;• Enable the receiver in synchronous mode only after both the transmitter and receiver&lt;BR /&gt;are enabled.&lt;BR /&gt;• Enable the transmitter last and disable the tranmitter first.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2026 07:52:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1040-EVK-SAI-EDMA-Local-Loopback-Issue-RX-buffer-data/m-p/2332262#M36360</guid>
      <dc:creator>nikonz66</dc:creator>
      <dc:date>2026-03-13T07:52:41Z</dc:date>
    </item>
  </channel>
</rss>

