<?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: Master LPSPI QSPI Read Configuration in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Master-LPSPI-QSPI-Read-Configuration/m-p/1803694#M28832</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm sorry for the late reply.&lt;/P&gt;
&lt;P&gt;Could you please help me with the following information?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;What SDK version are you using?&lt;/LI&gt;
&lt;LI&gt;IDE vesion&lt;/LI&gt;
&lt;LI&gt;What EVK version are you using A or B?&lt;/LI&gt;
&lt;LI&gt;How are you connecting the QSPI inteface to your FPGA?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you also take a look to the following AN's and threads. I think the can be useful.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/QSPI-on-i-MX-RT-1170/td-p/1762106" target="_blank"&gt;QSPI on i.MX RT 1170&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/docs/en/nxp/application-notes/AN12183.pdf" target="_blank"&gt;AN12183&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN12108.pdf" target="_blank"&gt;AN12108&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Feb 2024 21:50:23 GMT</pubDate>
    <dc:creator>DanielRuvalcaba</dc:creator>
    <dc:date>2024-02-07T21:50:23Z</dc:date>
    <item>
      <title>Master LPSPI QSPI Read Configuration</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Master-LPSPI-QSPI-Read-Configuration/m-p/1802231#M28794</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I’m working with an RT1176 EVK, my goal is to enable the Master LPSPI QSPI interface. The QSPI interface is connected to an FPGA. I was able to get the QSPI transmit side to successfully send packets of variable lengths to the FPGA. The FPGA properly decoded the QSPI data. However, I’m having issues on the read side.&lt;/P&gt;&lt;P&gt;I’m using the APP note “Using LPSPI on the KL28Z”as a reference (Document Number: AN5320) on how to configure the LPSPI QSPI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Using LPSPI on KL28Z" href="http://chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://www.nxp.com/docs/en/application-note/AN5320.pdf" target="_self"&gt;chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://www.nxp.com/docs/en/application-note/AN5320.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In effort to simplify things the ARM is not transmitting, only receiving. Also the FPGA is setting the D0-D3 signals high, so all of the incoming data should be 0xF.&lt;/P&gt;&lt;P&gt;Before entering the main loop I have the following configuration.&lt;/P&gt;&lt;P&gt;//set to 4 bit transfer&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR = (EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR &amp;amp; ~LPSPI_TCR_WIDTH_MASK) | LPSPI_TCR_WIDTH(2);&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//PCS[3:2] are configured for half-duplex 4-bit transfers&lt;/P&gt;&lt;P&gt;EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;CFGR1 = (EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;CFGR1 &amp;amp; ~LPSPI_CFGR1_PCSCFG_MASK) | LPSPI_CFGR1_PCSCFG(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//clear to enable receiving&lt;/P&gt;&lt;P&gt;EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR = (EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR &amp;amp; ~LPSPI_TCR_RXMSK_MASK);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//set to begin reading transfer&lt;/P&gt;&lt;P&gt;EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR = (EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR &amp;amp; ~LPSPI_TCR_TXMSK_MASK) | LPSPI_TCR_TXMSK(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the while(1) loop, I have the following configuration and I read the RDR register, which is 32 bits.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;//clear to enable receiving&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR = (EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR &amp;amp; ~LPSPI_TCR_RXMSK_MASK);&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;//set to begin reading transfer&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR = (EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR &amp;amp; ~LPSPI_TCR_TXMSK_MASK) | LPSPI_TCR_TXMSK(1);&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//Frame size&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR = (EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR &amp;amp; ~LPSPI_TCR_FRAMESZ_MASK) | LPSPI_TCR_FRAMESZ(7);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;//Receive data&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR = (EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;TCR &amp;amp; ~LPSPI_RDR_DATA_MASK) | LPSPI_RDR_DATA(7);&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;PRINTF(" %08X", EXAMPLE_LPSPI_MASTER_BASEADDR-&amp;gt;RDR);&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;PRINTF("\r\n Press any key to run again\r\n");&lt;/DIV&gt;&lt;DIV&gt;GETCHAR();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;In the APP note it lists the configuration needed to enable the QSPI interface. Part of the configuration from the 4-bit sending operation section 3.3.1 is also needed for the Read operation (highlighted in yellow).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rhsalced_2-1707183021620.png" style="width: 727px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/262044iD17702FD4C3CAEFD/image-dimensions/727x82?v=v2" width="727" height="82" role="button" title="rhsalced_2-1707183021620.png" alt="rhsalced_2-1707183021620.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rhsalced_3-1707183039866.png" style="width: 747px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/262045i1FE94D178AD25D84/image-dimensions/747x213?v=v2" width="747" height="213" role="button" title="rhsalced_3-1707183039866.png" alt="rhsalced_3-1707183039866.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rhsalced_4-1707183065516.png" style="width: 743px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/262046i05B31433D1305565/image-dimensions/743x169?v=v2" width="743" height="169" role="button" title="rhsalced_4-1707183065516.png" alt="rhsalced_4-1707183065516.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I’m probing the QSPI signals with an Oscope. I see 8 clock cycles per transaction, and 0xFF printed on the terminal, when it should be 0xFFFFFFFF. It’s as if the receive isn’t configured as QSPI, but instead as SPI.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rhsalced_6-1707183115849.png" style="width: 741px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/262048i1602ACE5EE8C464D/image-dimensions/741x442?v=v2" width="741" height="442" role="button" title="rhsalced_6-1707183115849.png" alt="rhsalced_6-1707183115849.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;Does anyone have any examples of how to configure the LPSPI QSPI to read multiple bytes?&lt;/P&gt;&lt;P&gt;Am I missing a configuration register that I need to set/clear to get the reads to work properly?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 01:46:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Master-LPSPI-QSPI-Read-Configuration/m-p/1802231#M28794</guid>
      <dc:creator>rhsalced</dc:creator>
      <dc:date>2024-02-06T01:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Master LPSPI QSPI Read Configuration</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Master-LPSPI-QSPI-Read-Configuration/m-p/1803694#M28832</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm sorry for the late reply.&lt;/P&gt;
&lt;P&gt;Could you please help me with the following information?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;What SDK version are you using?&lt;/LI&gt;
&lt;LI&gt;IDE vesion&lt;/LI&gt;
&lt;LI&gt;What EVK version are you using A or B?&lt;/LI&gt;
&lt;LI&gt;How are you connecting the QSPI inteface to your FPGA?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you also take a look to the following AN's and threads. I think the can be useful.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/QSPI-on-i-MX-RT-1170/td-p/1762106" target="_blank"&gt;QSPI on i.MX RT 1170&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/docs/en/nxp/application-notes/AN12183.pdf" target="_blank"&gt;AN12183&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN12108.pdf" target="_blank"&gt;AN12108&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 21:50:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Master-LPSPI-QSPI-Read-Configuration/m-p/1803694#M28832</guid>
      <dc:creator>DanielRuvalcaba</dc:creator>
      <dc:date>2024-02-07T21:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Master LPSPI QSPI Read Configuration</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Master-LPSPI-QSPI-Read-Configuration/m-p/1803729#M28837</link>
      <description>&lt;UL&gt;&lt;LI&gt;What EVK version are you using A or B?&lt;UL&gt;&lt;LI&gt;I'm using an Embedded Artist EVK&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://www.embeddedartists.com/products/imx-rt1176-developers-kit/" target="_self"&gt;https://www.embeddedartists.com/products/imx-rt1176-developers-kit/&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;What SDK version are you using?&lt;UL&gt;&lt;LI&gt;I started off with the LPSPI -&amp;gt; polling_b2b_transfter -&amp;gt; master -&amp;gt; cm7 example project&lt;/LI&gt;&lt;LI&gt;The SDK version that I am using was provided by embedded artist. It seems to be very similar to the NXP's SDK, but obviously has modifications to the code so it can run on the embedded artist RT1176 EVK&lt;/LI&gt;&lt;LI&gt;&lt;A href="http://imx.embeddedartists.com/#imxrt1176" target="_self"&gt;http://imx.embeddedartists.com/#imxrt1176&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rhsalced_8-1707348299736.png" style="width: 570px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/262413iAFFA9BA3BA65844F/image-dimensions/570x218?v=v2" width="570" height="218" role="button" title="rhsalced_8-1707348299736.png" alt="rhsalced_8-1707348299736.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;IDE version&lt;UL&gt;&lt;LI&gt;Keil uVision 5 (V5.27.1.0)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;How are you connecting the QSPI interface to your FPGA?&lt;UL&gt;&lt;LI&gt;I'm connecting CLK, CS, D0, D1, D2, D3 from the J15 connector on the RT1176 EVK to a PMOD header on the FPGA EVK&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to successfully read 32 bits from the FPGA. The problem was that the default LPSPI project was configuring SDO in the wrong way. SDO was being told to retain its value. This was causing weird issue where sometimes I would properly decode the 32 bit word and other times I would not. &amp;nbsp;See highlighted.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rhsalced_6-1707347896440.png" style="width: 769px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/262411i06D60C9098A5496D/image-dimensions/769x348?v=v2" width="769" height="348" role="button" title="rhsalced_6-1707347896440.png" alt="rhsalced_6-1707347896440.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I had to make the following change.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rhsalced_7-1707347930857.png" style="width: 769px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/262412iFCB23A9BA90BDE9D/image-dimensions/769x25?v=v2" width="769" height="25" role="button" title="rhsalced_7-1707347930857.png" alt="rhsalced_7-1707347930857.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm now working on transferring larger packets sizes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the links. I will take a look at them.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ricardo&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;DIV class=""&gt;&amp;nbsp;&lt;/DIV&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;</description>
      <pubDate>Wed, 07 Feb 2024 23:26:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Master-LPSPI-QSPI-Read-Configuration/m-p/1803729#M28837</guid>
      <dc:creator>rhsalced</dc:creator>
      <dc:date>2024-02-07T23:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Master LPSPI QSPI Read Configuration</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Master-LPSPI-QSPI-Read-Configuration/m-p/1806138#M28883</link>
      <description>&lt;P&gt;Thanks for letting us know that you are able to read.&lt;/P&gt;
&lt;P&gt;Please also let us know your findings.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 21:08:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Master-LPSPI-QSPI-Read-Configuration/m-p/1806138#M28883</guid>
      <dc:creator>DanielRuvalcaba</dc:creator>
      <dc:date>2024-02-13T21:08:35Z</dc:date>
    </item>
  </channel>
</rss>

