<?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 operations in QPI mode in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/flexSPI-operations-in-QPI-mode/m-p/1618360#M24184</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;continue this topic :&amp;nbsp;&lt;A href="https://community.nxp.com/t5/i-MX-RT/Read-Id-using-flex-SPI-on-QPI-mode/m-p/1581683" target="_blank" rel="noopener"&gt;Re: Read Id using flex SPI on QPI mode - NXP Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and with this FLASH device :&amp;nbsp;&lt;A href="https://pdf1.alldatasheet.com/datasheet-pdf/view/506494/WINBOND/W25Q128FV.html" target="_blank" rel="noopener"&gt;W25Q128FV pdf, W25Q128FV Description, W25Q128FV Datasheet, W25Q128FV view ::: ALLDATASHEET :::&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and with modified code for the SDK example : flexspi_nor_polling_transfer&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;all single SPI operations works perfect&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;we are trying to use operations on &lt;U&gt;&lt;STRONG&gt;QPI mode&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;lets focus on 2 operations: Reading Jedec ID and Program Page&lt;/P&gt;&lt;P&gt;the enable bit on status register is set.&lt;/P&gt;&lt;P&gt;the LUT entry for enabling QPI mode:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;[4 * NOR_CMD_LUT_SEQ_IDX_ENTERQPI] =&lt;BR /&gt;FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x38, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;and the code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;status_t flexspi_nor_enable_qpi_mode(FLEXSPI_Type *base)
{
	/* Write enable */
		status_t status;
	    flexspi_transfer_t flashXfer;

		status = flexspi_nor_write_enable(base, 0);

		if (status != kStatus_Success)
		{
			return status;
		}

		flashXfer.deviceAddress = 0;
		flashXfer.port          = FLASH_PORT;
		flashXfer.cmdType       = kFLEXSPI_Command;
		flashXfer.SeqNumber     = 1;
		flashXfer.seqIndex      = NOR_CMD_LUT_SEQ_IDX_ENTERQPI;

		status = FLEXSPI_TransferBlocking(base, &amp;amp;flashXfer);

		if (status != kStatus_Success)
		{
			return status;
		}

		//status = flexspi_nor_wait_bus_busy(base);

		/* Do software reset. */
		FLEXSPI_SoftwareReset(base);

		return status;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the busy wait is commented because it stucks\hangs\deadlock.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as for Jedec ID, the entry is this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;/* Read ID */&lt;BR /&gt;[4 * NOR_CMD_LUT_SEQ_IDX_READID] =&lt;BR /&gt;FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, &lt;STRONG&gt;kFLEXSPI_4PAD&lt;/STRONG&gt; , 0x9F, kFLEXSPI_Command_READ_SDR, &lt;STRONG&gt;kFLEXSPI_4PAD&lt;/STRONG&gt; , 0x04)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;and the result, after entering &lt;STRONG&gt;QPI&lt;/STRONG&gt; mode, is&amp;nbsp;&lt;STRONG&gt;0x1940ff&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;the result on Single SPI is&amp;nbsp;&lt;STRONG&gt;0x1940ef&lt;/STRONG&gt; and this is the &lt;STRONG&gt;correct&lt;/STRONG&gt; one, with this LUT:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;[4 * NOR_CMD_LUT_SEQ_IDX_READID] =&lt;BR /&gt;FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, &lt;STRONG&gt;kFLEXSPI_1PAD&lt;/STRONG&gt; , 0x9F, kFLEXSPI_Command_READ_SDR, &lt;STRONG&gt;kFLEXSPI_1PAD&lt;/STRONG&gt; , 0x04)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.now we have issue with programming.&lt;/P&gt;&lt;P&gt;using this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;[4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_SINGLE] =&lt;BR /&gt;FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0x02, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_4PAD, 0x20),&lt;BR /&gt;[4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_SINGLE + 1] =&lt;BR /&gt;FLEXSPI_LUT_SEQ(kFLEXSPI_Command_WRITE_SDR, kFLEXSPI_4PAD, 0x20, kFLEXSPI_Command_STOP, kFLEXSPI_4PAD, 0),&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;only the &lt;STRONG&gt;first programming command works&lt;/STRONG&gt;, after setting 4 byte mode and entering QPI mode.&lt;BR /&gt;so I can only program a single page in one run. strange. what is missing? maybe the stop command is not valid?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;it actually stuck on busy wait and I need to remove the busy wait command. could it be related?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from spec:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adi2Intel_0-1679327345085.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/215405i100047E6111A491A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adi2Intel_0-1679327345085.png" alt="adi2Intel_0-1679327345085.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="adi2Intel_1-1679327373282.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/215406iD83409D829BD8D9B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adi2Intel_1-1679327373282.png" alt="adi2Intel_1-1679327373282.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT&amp;nbsp; : programming issue solved. only JedecID issue left&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;Thanks&lt;/P&gt;&lt;P&gt;Adi&lt;/P&gt;&lt;P&gt;Intel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 26 Mar 2023 07:07:57 GMT</pubDate>
    <dc:creator>adi2Intel</dc:creator>
    <dc:date>2023-03-26T07:07:57Z</dc:date>
    <item>
      <title>flexSPI operations in QPI mode</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/flexSPI-operations-in-QPI-mode/m-p/1618360#M24184</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;continue this topic :&amp;nbsp;&lt;A href="https://community.nxp.com/t5/i-MX-RT/Read-Id-using-flex-SPI-on-QPI-mode/m-p/1581683" target="_blank" rel="noopener"&gt;Re: Read Id using flex SPI on QPI mode - NXP Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and with this FLASH device :&amp;nbsp;&lt;A href="https://pdf1.alldatasheet.com/datasheet-pdf/view/506494/WINBOND/W25Q128FV.html" target="_blank" rel="noopener"&gt;W25Q128FV pdf, W25Q128FV Description, W25Q128FV Datasheet, W25Q128FV view ::: ALLDATASHEET :::&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and with modified code for the SDK example : flexspi_nor_polling_transfer&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;all single SPI operations works perfect&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;we are trying to use operations on &lt;U&gt;&lt;STRONG&gt;QPI mode&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;lets focus on 2 operations: Reading Jedec ID and Program Page&lt;/P&gt;&lt;P&gt;the enable bit on status register is set.&lt;/P&gt;&lt;P&gt;the LUT entry for enabling QPI mode:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;[4 * NOR_CMD_LUT_SEQ_IDX_ENTERQPI] =&lt;BR /&gt;FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x38, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;and the code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;status_t flexspi_nor_enable_qpi_mode(FLEXSPI_Type *base)
{
	/* Write enable */
		status_t status;
	    flexspi_transfer_t flashXfer;

		status = flexspi_nor_write_enable(base, 0);

		if (status != kStatus_Success)
		{
			return status;
		}

		flashXfer.deviceAddress = 0;
		flashXfer.port          = FLASH_PORT;
		flashXfer.cmdType       = kFLEXSPI_Command;
		flashXfer.SeqNumber     = 1;
		flashXfer.seqIndex      = NOR_CMD_LUT_SEQ_IDX_ENTERQPI;

		status = FLEXSPI_TransferBlocking(base, &amp;amp;flashXfer);

		if (status != kStatus_Success)
		{
			return status;
		}

		//status = flexspi_nor_wait_bus_busy(base);

		/* Do software reset. */
		FLEXSPI_SoftwareReset(base);

		return status;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the busy wait is commented because it stucks\hangs\deadlock.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as for Jedec ID, the entry is this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;/* Read ID */&lt;BR /&gt;[4 * NOR_CMD_LUT_SEQ_IDX_READID] =&lt;BR /&gt;FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, &lt;STRONG&gt;kFLEXSPI_4PAD&lt;/STRONG&gt; , 0x9F, kFLEXSPI_Command_READ_SDR, &lt;STRONG&gt;kFLEXSPI_4PAD&lt;/STRONG&gt; , 0x04)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;and the result, after entering &lt;STRONG&gt;QPI&lt;/STRONG&gt; mode, is&amp;nbsp;&lt;STRONG&gt;0x1940ff&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;the result on Single SPI is&amp;nbsp;&lt;STRONG&gt;0x1940ef&lt;/STRONG&gt; and this is the &lt;STRONG&gt;correct&lt;/STRONG&gt; one, with this LUT:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;[4 * NOR_CMD_LUT_SEQ_IDX_READID] =&lt;BR /&gt;FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, &lt;STRONG&gt;kFLEXSPI_1PAD&lt;/STRONG&gt; , 0x9F, kFLEXSPI_Command_READ_SDR, &lt;STRONG&gt;kFLEXSPI_1PAD&lt;/STRONG&gt; , 0x04)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.now we have issue with programming.&lt;/P&gt;&lt;P&gt;using this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;[4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_SINGLE] =&lt;BR /&gt;FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0x02, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_4PAD, 0x20),&lt;BR /&gt;[4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_SINGLE + 1] =&lt;BR /&gt;FLEXSPI_LUT_SEQ(kFLEXSPI_Command_WRITE_SDR, kFLEXSPI_4PAD, 0x20, kFLEXSPI_Command_STOP, kFLEXSPI_4PAD, 0),&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;only the &lt;STRONG&gt;first programming command works&lt;/STRONG&gt;, after setting 4 byte mode and entering QPI mode.&lt;BR /&gt;so I can only program a single page in one run. strange. what is missing? maybe the stop command is not valid?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;it actually stuck on busy wait and I need to remove the busy wait command. could it be related?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from spec:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adi2Intel_0-1679327345085.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/215405i100047E6111A491A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adi2Intel_0-1679327345085.png" alt="adi2Intel_0-1679327345085.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="adi2Intel_1-1679327373282.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/215406iD83409D829BD8D9B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adi2Intel_1-1679327373282.png" alt="adi2Intel_1-1679327373282.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT&amp;nbsp; : programming issue solved. only JedecID issue left&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;Thanks&lt;/P&gt;&lt;P&gt;Adi&lt;/P&gt;&lt;P&gt;Intel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 07:07:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/flexSPI-operations-in-QPI-mode/m-p/1618360#M24184</guid>
      <dc:creator>adi2Intel</dc:creator>
      <dc:date>2023-03-26T07:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: flexSPI operations in QPI mode</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/flexSPI-operations-in-QPI-mode/m-p/1619078#M24195</link>
      <description>&lt;P&gt;Here is a logic analyzer sniff from read ID command :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adi2Intel_0-1679391651585.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/215577i05B645173A6091E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adi2Intel_0-1679391651585.png" alt="adi2Intel_0-1679391651585.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;without drawings:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adi2Intel_4-1679391797236.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/215582i9F32A1EF0B169DBB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adi2Intel_4-1679391797236.png" alt="adi2Intel_4-1679391797236.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;notice the issue in the manufacture ID that should be EF:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adi2Intel_2-1679391702318.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/215579i4E5079C4A703644C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adi2Intel_2-1679391702318.png" alt="adi2Intel_2-1679391702318.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so there is an ussue on clock cycle 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 09:44:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/flexSPI-operations-in-QPI-mode/m-p/1619078#M24195</guid>
      <dc:creator>adi2Intel</dc:creator>
      <dc:date>2023-03-21T09:44:42Z</dc:date>
    </item>
  </channel>
</rss>

