<?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 FLEXSPI eDMA read issue: half data loss in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FLEXSPI-eDMA-read-issue-half-data-loss/m-p/1622501#M24276</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm debugging QSPI between R1166 (Master) and FPGA (Slave).&lt;/P&gt;&lt;P&gt;I use MCUXpresso IDE with SDK: SDK_2_13_0_MIMXRT1160-EVK (board - &lt;SPAN&gt;MIMXRT1160-EVK&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;I use modified example (SDK_2_13_0_MIMXRT1160-EVK/boards/evkmimxrt1160/driver_examples/flexspi/nor/edma_transfer/cm7/). Modifications: changed FLEXSPI1 to FLEXSPI2, created my own LUT.&lt;/P&gt;&lt;P&gt;Transactions: write buffer (128 bytes), then read buffer&amp;nbsp;(128 bytes). Using logic analyzer, I can see that data is correct. Also, reading via AHB bus works properly. But call of function&amp;nbsp;flexspi_nor_read_data() returns broken data. Data should be an increment from 0 to 0x7F, but really looks like 8 bytes added to buffer, 8 lost, 8 added, 8 lost, etc. So, second half of buffer is&amp;nbsp;trash.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is a screenshot from log, where 1-st buffer is data received from&amp;nbsp;flexspi_nor_read_data(), and 2-nd - reading via AHB (copy from&amp;nbsp;FlexSPI2_AMBA_BASE):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="log.png" style="width: 498px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/216376i964432B1147FDF47/image-size/large?v=v2&amp;amp;px=999" role="button" title="log.png" alt="log.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;s_fpga_read_buffer is located in non-cacheble section.&lt;/P&gt;&lt;P&gt;Could you please help me where I can search bug? Is it DMA side or FLEXSPI?&lt;/P&gt;</description>
    <pubDate>Mon, 27 Mar 2023 10:13:45 GMT</pubDate>
    <dc:creator>aleksejshch</dc:creator>
    <dc:date>2023-03-27T10:13:45Z</dc:date>
    <item>
      <title>FLEXSPI eDMA read issue: half data loss</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FLEXSPI-eDMA-read-issue-half-data-loss/m-p/1622501#M24276</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm debugging QSPI between R1166 (Master) and FPGA (Slave).&lt;/P&gt;&lt;P&gt;I use MCUXpresso IDE with SDK: SDK_2_13_0_MIMXRT1160-EVK (board - &lt;SPAN&gt;MIMXRT1160-EVK&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;I use modified example (SDK_2_13_0_MIMXRT1160-EVK/boards/evkmimxrt1160/driver_examples/flexspi/nor/edma_transfer/cm7/). Modifications: changed FLEXSPI1 to FLEXSPI2, created my own LUT.&lt;/P&gt;&lt;P&gt;Transactions: write buffer (128 bytes), then read buffer&amp;nbsp;(128 bytes). Using logic analyzer, I can see that data is correct. Also, reading via AHB bus works properly. But call of function&amp;nbsp;flexspi_nor_read_data() returns broken data. Data should be an increment from 0 to 0x7F, but really looks like 8 bytes added to buffer, 8 lost, 8 added, 8 lost, etc. So, second half of buffer is&amp;nbsp;trash.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is a screenshot from log, where 1-st buffer is data received from&amp;nbsp;flexspi_nor_read_data(), and 2-nd - reading via AHB (copy from&amp;nbsp;FlexSPI2_AMBA_BASE):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="log.png" style="width: 498px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/216376i964432B1147FDF47/image-size/large?v=v2&amp;amp;px=999" role="button" title="log.png" alt="log.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;s_fpga_read_buffer is located in non-cacheble section.&lt;/P&gt;&lt;P&gt;Could you please help me where I can search bug? Is it DMA side or FLEXSPI?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 10:13:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FLEXSPI-eDMA-read-issue-half-data-loss/m-p/1622501#M24276</guid>
      <dc:creator>aleksejshch</dc:creator>
      <dc:date>2023-03-27T10:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: FLEXSPI eDMA read issue: half data loss</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FLEXSPI-eDMA-read-issue-half-data-loss/m-p/1622612#M24277</link>
      <description>&lt;P&gt;In SDK file fsl_flexspi_edma.c in function&amp;nbsp;FLEXSPI_TransferEDMA() I found that for case "else if (xfer-&amp;gt;cmdType == kFLEXSPI_Read)"&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see next&amp;nbsp; call:&lt;/P&gt;&lt;P&gt;EDMA_SetModulo(handle-&amp;gt;txDmaHandle-&amp;gt;base, handle-&amp;gt;txDmaHandle-&amp;gt;channel, (edma_modulo_t)power,&lt;BR /&gt;kEDMA_ModuloDisable);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I think it should be:&lt;/P&gt;&lt;P&gt;EDMA_SetModulo(handle-&amp;gt;rxDmaHandle-&amp;gt;base, handle-&amp;gt;rxDmaHandle-&amp;gt;channel, (edma_modulo_t)power,&lt;BR /&gt;kEDMA_ModuloDisable);&lt;/P&gt;&lt;P&gt;At least when I changed it, I can see expected values in receive buffer.&lt;/P&gt;&lt;P&gt;Is it correct?&amp;nbsp; &amp;nbsp;Is it SDK mistake?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 12:58:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FLEXSPI-eDMA-read-issue-half-data-loss/m-p/1622612#M24277</guid>
      <dc:creator>aleksejshch</dc:creator>
      <dc:date>2023-03-27T12:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: FLEXSPI eDMA read issue: half data loss</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FLEXSPI-eDMA-read-issue-half-data-loss/m-p/1627481#M24423</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for the help.&lt;/P&gt;
&lt;P&gt;I will report this SDK software driver bug to SDK software team. Thanks again.&lt;/P&gt;
&lt;P&gt;best regards,&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 08:17:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FLEXSPI-eDMA-read-issue-half-data-loss/m-p/1627481#M24423</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2023-04-04T08:17:55Z</dc:date>
    </item>
  </channel>
</rss>

