<?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>i.MX Processors中的主题 Re: How to write and read data from NOR Flash using QSPI ?</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-write-and-read-data-from-NOR-Flash-using-QSPI/m-p/1247938#M171036</link>
    <description>&lt;P&gt;In the Yocto BSP, there is imx-test package. (bitbake imx-test).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then the source code can be found in the &amp;lt;build_dir&amp;gt;/tmp/work/aarch64-&amp;lt;chip&amp;gt;-poky-linux/imx-test/.&lt;/P&gt;
&lt;P&gt;There is test/mxc_spi_test/mxc_spi_test1.c. You can take this for reference._&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Mar 2021 08:07:29 GMT</pubDate>
    <dc:creator>jimmychan</dc:creator>
    <dc:date>2021-03-18T08:07:29Z</dc:date>
    <item>
      <title>How to write and read data from NOR Flash using QSPI ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-write-and-read-data-from-NOR-Flash-using-QSPI/m-p/1245691#M170865</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am a newbie here.&lt;/P&gt;&lt;P&gt;I am trying to write and read data from NOR FLASH of IMX6UL using QSPI.&lt;/P&gt;&lt;P&gt;I have used the&amp;nbsp;evkmcimx6ul driver example for QSPI to read and write the data.&lt;/P&gt;&lt;P&gt;But, I am not able to read the data, and that's where I am having a doubt whether I am writing the data properly or not.&lt;/P&gt;&lt;P&gt;Below is the read and write code snippet for reference.&lt;/P&gt;&lt;P&gt;I have not done any changes to the driver example. It is as it is given in QSPI driver example.&lt;/P&gt;&lt;P&gt;/*Function to read and write */&lt;BR /&gt;void enable_quad_mode(void)&lt;BR /&gt;{&lt;BR /&gt;uint32_t writeData[4] = {0x10804505, 0x10804505,0x15240080,0x46854570};&lt;BR /&gt;uint32_t readData[4] = {0, 0, 0, 0};&lt;/P&gt;&lt;P&gt;/* Start the program */&lt;BR /&gt;QSPI_SetIPCommandSize(EXAMPLE_QSPI, 16);&lt;BR /&gt;&lt;BR /&gt;while (QSPI_GetStatusFlags(EXAMPLE_QSPI) &amp;amp; kQSPI_Busy)&lt;BR /&gt;{&lt;BR /&gt;}&lt;BR /&gt;QSPI_SetIPCommandAddress(EXAMPLE_QSPI, FSL_FEATURE_QSPI_AMBA_BASE);&lt;/P&gt;&lt;P&gt;/* Clear Tx FIFO */&lt;BR /&gt;QSPI_ClearFifo(EXAMPLE_QSPI, kQSPI_TxFifo);&lt;/P&gt;&lt;P&gt;/* Write enable */&lt;BR /&gt;cmd_write_enable();&lt;/P&gt;&lt;P&gt;/* Write data into TX FIFO, needs to write at least 16 bytes of data */&lt;BR /&gt;QSPI_WriteBlocking(EXAMPLE_QSPI, writeData FSL_FEATURE_QSPI_TXFIFO_DEPTH);&lt;/P&gt;&lt;P&gt;/* Set seq id, write register */&lt;BR /&gt;QSPI_ExecuteIPCommand(EXAMPLE_QSPI, 20);&lt;/P&gt;&lt;P&gt;/* Wait until finished */&lt;BR /&gt;check_if_finished();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/*Read data */&lt;/P&gt;&lt;P&gt;QSPI_SetIPCommandSize(EXAMPLE_QSPI, 16);&lt;BR /&gt;&lt;BR /&gt;QSPI_SetIPCommandAddress(EXAMPLE_QSPI, FSL_FEATURE_QSPI_AMBA_BASE);&lt;BR /&gt;&lt;BR /&gt;/* Set seq id, read register */&lt;BR /&gt;QSPI_ExecuteIPCommand(EXAMPLE_QSPI, 0);&lt;BR /&gt;&lt;BR /&gt;QSPI_ReadBlocking(EXAMPLE_QSPI, readData,FSL_FEATURE_QSPI_RXFIFO_DEPTH);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;So, can anyone please help with writing and reading the written data back?&lt;/P&gt;&lt;P&gt;And also can anyone please provide any reference code for reading the data from NOR FLASH using QSPI.&lt;/P&gt;&lt;P&gt;Any help will be appreciable.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 14:10:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-write-and-read-data-from-NOR-Flash-using-QSPI/m-p/1245691#M170865</guid>
      <dc:creator>theats</dc:creator>
      <dc:date>2021-03-16T14:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to write and read data from NOR Flash using QSPI ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-write-and-read-data-from-NOR-Flash-using-QSPI/m-p/1247938#M171036</link>
      <description>&lt;P&gt;In the Yocto BSP, there is imx-test package. (bitbake imx-test).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then the source code can be found in the &amp;lt;build_dir&amp;gt;/tmp/work/aarch64-&amp;lt;chip&amp;gt;-poky-linux/imx-test/.&lt;/P&gt;
&lt;P&gt;There is test/mxc_spi_test/mxc_spi_test1.c. You can take this for reference._&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 08:07:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-write-and-read-data-from-NOR-Flash-using-QSPI/m-p/1247938#M171036</guid>
      <dc:creator>jimmychan</dc:creator>
      <dc:date>2021-03-18T08:07:29Z</dc:date>
    </item>
  </channel>
</rss>

