<?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: MX RT FlexSPI get vendor id always returns 0 in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1715874#M26651</link>
    <description>&lt;P&gt;Update: So I have 3 custom boards. 2 always returns 0 and 1 always returns 08, and when I expand the datasize, the 08 populate every byte.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Sep 2023 15:35:35 GMT</pubDate>
    <dc:creator>csutyaksancsoft</dc:creator>
    <dc:date>2023-09-01T15:35:35Z</dc:date>
    <item>
      <title>MX RT FlexSPI get vendor id always returns 0</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1715180#M26637</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am attempting to use the FlexSPI driver to drive a NAND-Flash Chip (winbond W25n01GVxx1G) using the &lt;A href="https://github.com/nxp-mcuxpresso/mcux-sdk-examples/tree/main/evkmimxrt1160/driver_examples/flexspi/nor/polling_transfer/cm7" target="_self"&gt;polling_transfer&lt;/A&gt; SDK example on a custom XRT116x board. The starting point to talking to a SPI Flash device is to read the ID and go from there. However, No matter what, the ID I read from the chip is always 0.&lt;/P&gt;&lt;P&gt;However, what is weird, is when I hooked a scope to each pin they are doing exactly what should be done based on this diagram from the NAND Chip:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="csutyaksancsoft_1-1693493703521.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/239133i21FB3BB44F659C89/image-size/medium?v=v2&amp;amp;px=400" role="button" title="csutyaksancsoft_1-1693493703521.png" alt="csutyaksancsoft_1-1693493703521.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In other words, the DI pin and DO pin are correctly sending the expected data where DI is sending the command 9F and the DO pin is sending the ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Some extra configuration info&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The chip is connected as the image below where:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;NAND_SCLK is connected to GPIO_EMC_B2_10:FLEXSPI2_A_SCLK&lt;/LI&gt;&lt;LI&gt;NAND_SS0 is connected to GPIO_EMC_B2_11:FLEXSPI2_A_SS0B&lt;/LI&gt;&lt;LI&gt;NAND_DATA0 is connected to GPIO_EMC_B2_13:FLEXSPI2_A_DATA0&lt;/LI&gt;&lt;LI&gt;NAND_DATA1 is connected to GPIO_EMC_B2_14:FLEXSPI2_A_DATA1&lt;/LI&gt;&lt;LI&gt;NAND_DATA2 is connected to GPIO_EMC_B2_15:FLEXSPI2_A_DATA2&lt;/LI&gt;&lt;LI&gt;NAND_DATA3 is connected to GPIO_EMC_B2_16:FLEXSPI2_A_DATA3&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="csutyaksancsoft_0-1693493114629.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/239131iE62EA145050FF45E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="csutyaksancsoft_0-1693493114629.png" alt="csutyaksancsoft_0-1693493114629.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The things I changed from the original example&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(app.h) changed all defs to use FLEXSPI2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;#define EXAMPLE_FLEXSPI FLEXSPI2&lt;BR /&gt;#define FLASH_SIZE 0x20000 /* 128Mb/KByte */&lt;BR /&gt;#define EXAMPLE_FLEXSPI_AMBA_BASE FlexSPI2_AMBA_BASE&lt;BR /&gt;#define FLASH_PAGE_SIZE 256&lt;BR /&gt;#define EXAMPLE_SECTOR 20&lt;BR /&gt;#define SECTOR_SIZE 0x200 /* 4K */&lt;BR /&gt;#define EXAMPLE_FLEXSPI_CLOCK kCLOCK_Flexspi2&lt;BR /&gt;#define FLASH_PORT kFLEXSPI_PortA2&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(flexspi_nor_flash_ops.c : flex_spi_nor_get_vendor_id) changed size to 4 and used an array for data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;uint8_t temp[10] = {0,0,0,0,0,0,0,0,0,0};&lt;BR /&gt;&lt;/SPAN&gt;flexspi_transfer_t flashXfer;&lt;BR /&gt;flashXfer.deviceAddress = 0;&lt;BR /&gt;flashXfer.port = FLASH_PORT;&lt;BR /&gt;flashXfer.cmdType = kFLEXSPI_Read;&lt;BR /&gt;flashXfer.SeqNumber = 1;&lt;BR /&gt;flashXfer.seqIndex = NOR_CMD_LUT_SEQ_IDX_READID;&lt;BR /&gt;flashXfer.data = (uint32_t*)temp;&lt;BR /&gt;flashXfer.dataSize = 4;&lt;/P&gt;&lt;P&gt;status_t status = FLEXSPI_TransferBlocking(base, &amp;amp;flashXfer);&lt;/P&gt;&lt;P&gt;//NOTE: temp is always full of 0s after transferBlocking.&amp;nbsp;&lt;/P&gt;&lt;P&gt;*vendorId = temp[0];&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(flexspi_nor_polling_transfer.c: main)&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;I manually pulled down the CS pin using&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;GPIO_PinInit(GPIO8, 21, &amp;amp;GPIO_config);&lt;/P&gt;&lt;P&gt;GPIO_PinWrite(GPIO8, 21, 0);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(flexspi_nor_polling_transfer.c: CustomLUT) changed 0x4 -&amp;gt; 0x18&lt;BR /&gt;&lt;/STRONG&gt;/* Read ID */&lt;BR /&gt;[4 * NOR_CMD_LUT_SEQ_IDX_READID] =&lt;BR /&gt;FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x9F, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x18),&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe this is a config issue that I am not experienced enough to understand yet. I don't know if the port is configured correctly based on my HW configuration. I imagine I am doing something wrong because I had to manually pull down the CS Pin.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Cole&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 15:27:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1715180#M26637</guid>
      <dc:creator>csutyaksancsoft</dc:creator>
      <dc:date>2023-08-31T15:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: MX RT FlexSPI get vendor id always returns 0</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1715874#M26651</link>
      <description>&lt;P&gt;Update: So I have 3 custom boards. 2 always returns 0 and 1 always returns 08, and when I expand the datasize, the 08 populate every byte.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 15:35:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1715874#M26651</guid>
      <dc:creator>csutyaksancsoft</dc:creator>
      <dc:date>2023-09-01T15:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: MX RT FlexSPI get vendor id always returns 0</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1718224#M26701</link>
      <description>&lt;P class="lia-align-justify"&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/217774"&gt;@csutyaksancsoft&lt;/a&gt;,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Could you please take a look to the &lt;A href="https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus/i-mx-rt1170-crossover-mcu-dual-core-arm-cortex-m7-and-cortex-m4-operating-up-to-1-ghz:i.MX-RT1170?fpsp=1#documentation" target="_self"&gt;Hardware Development Guide for the MIMXRT1160/1170 Processor&lt;/A&gt;?&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Also, it might be useful to check the &lt;A href="https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus/i-mx-rt1170-crossover-mcu-dual-core-arm-cortex-m7-and-cortex-m4-operating-up-to-1-ghz:i.MX-RT1170?fpsp=1#documentation" target="_self"&gt;i.MX RT1170 Processor Reference Manual&lt;/A&gt;. Section 10.6.3.3 Serial NAND configuration block (512 bytes)., which includes an example of Serial NAND configuration block for Winbond W25N01GVZEIG; and Table 10-1. ROM Bootloader Peripheral PinMux., for FLEXSPI NAND Flash set up and a Note to Serial NAND Flash Boot over&amp;nbsp;FlexSPI.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Best regards, Raul.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 19:49:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1718224#M26701</guid>
      <dc:creator>RaRo</dc:creator>
      <dc:date>2023-09-06T19:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: MX RT FlexSPI get vendor id always returns 0</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1718231#M26702</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hey Raul,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply! I have been struggling to fix this problem for a long time.&lt;/P&gt;&lt;P&gt;I am not trying to boot over flash, I am simply trying to store NV-Data onto the chip.&lt;BR /&gt;Also after reading,&amp;nbsp;where is flexspi_nand_config_t located? There are no SDK examples that include that struct. Also are there any examples, tutorials, or manuals that explain how to use flexspi_nand_config_t to configure flexspi?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Cole&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 20:21:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1718231#M26702</guid>
      <dc:creator>csutyaksancsoft</dc:creator>
      <dc:date>2023-09-06T20:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: MX RT FlexSPI get vendor id always returns 0</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1719732#M26729</link>
      <description>&lt;P class="lia-align-justify"&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/217774"&gt;@csutyaksancsoft&lt;/a&gt;,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Could you please try the following suggestions?&lt;/P&gt;
&lt;UL class="lia-align-justify" type="disc"&gt;
&lt;LI&gt;First, change &lt;EM&gt;#define EXAMPLE_FLEXSPI_RX_SAMPLE_CLOCK&lt;/EM&gt; to &lt;EM&gt;kFLEXSPI_ReadSampleClkLoopbackInternally&lt;/EM&gt; in &lt;STRONG&gt;app.h&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Second, try use the &lt;EM&gt;flashXfer&lt;/EM&gt; and &lt;EM&gt;temp&lt;/EM&gt; just as the example in &lt;STRONG&gt;flexspi_nor_flash_ops.c&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-align-justify"&gt;Also, could you tell us why are you changing &lt;EM&gt;CustomLUT&lt;/EM&gt; from 0x4 to 0x18, and &lt;EM&gt;SECTOR_SIZE&lt;/EM&gt; to 0x200?&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class="lia-align-justify"&gt;&lt;EM&gt;Also are there any examples, tutorials, or manuals that explain how to use flexspi_nand_config_t to configure flexspi?&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P class="lia-align-justify"&gt;Unfortunately, there are not any examples about how to use flexspi_nand_config_t.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Best regards, Raul.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 20:15:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1719732#M26729</guid>
      <dc:creator>RaRo</dc:creator>
      <dc:date>2023-09-08T20:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: MX RT FlexSPI get vendor id always returns 0</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1720447#M26755</link>
      <description>&lt;P&gt;Hey Raul,&lt;/P&gt;&lt;P&gt;I have tried both of those suggestions to start with, however, I tried them again just now to make sure. They didn't fix the issue. I am fairly confident that the problem is within the the initialization of the flexspi and not when calling the&amp;nbsp;&lt;STRONG&gt;flexspi_nor_get_vendor_id.&amp;nbsp;&lt;/STRONG&gt;The reason I believe&amp;nbsp; this is because when I step through the code in the&amp;nbsp;&lt;STRONG&gt;FLEXSPI_TransferBlocking&amp;nbsp;&lt;/STRONG&gt;when I get within the&amp;nbsp;&lt;STRONG&gt;FLEXSPI_ReadBlocking&amp;nbsp;&lt;/STRONG&gt;the data in base-&amp;gt;RFDR is wrong, it repeats the same byte to fill up whatever size I set it to.&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Also, could you tell us why are you changing&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;CustomLUT&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;from 0x4 to 0x18, and&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;SECTOR_SIZE&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;to 0x200?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I changed CustomLUT from 0x4 to 0x18 to reflect the amount of bytes I am expecting to get. I read on a couple blogs that the 6th param of&amp;nbsp;&lt;STRONG&gt;FLEXSPI_LUT_SEQ&amp;nbsp;&lt;/STRONG&gt;is the size that you expect from the 4th param. In other words, I expected 3 bytes or 24 bits from kFLEXSPI_Command_READ_SDR so I set it to 0x18.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I changed SECTOR_SIZE to 0x200 to reflect the sector size of my flash chip based on the specifications.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Its also worth noting that I have tried&amp;nbsp;&lt;STRONG&gt;all&amp;nbsp;&lt;/STRONG&gt;of the default configs in the example. Meaning everything I have changed, I started by trying the default values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Cole&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 14:04:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1720447#M26755</guid>
      <dc:creator>csutyaksancsoft</dc:creator>
      <dc:date>2023-09-11T14:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: MX RT FlexSPI get vendor id always returns 0</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1724048#M26844</link>
      <description>&lt;P class="lia-align-justify"&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/217774"&gt;@csutyaksancsoft&lt;/a&gt;,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Could you please check the following points about the FlexSPI Initialization?&lt;/P&gt;
&lt;UL class="lia-align-justify" type="disc"&gt;
&lt;LI&gt;In &lt;EM&gt;flexspi_nor_flash_init(EXAMPLE_FLEXSPI)&lt;/EM&gt; look for &lt;EM&gt;flexspi_clock_init()&lt;/EM&gt;. Could you please check it out has the&lt;EM&gt; kCLOCK_Root_Flexspi2&lt;/EM&gt; instead of &lt;EM&gt;kCLOCK_Root_Flexspi1&lt;/EM&gt;?&lt;/LI&gt;
&lt;LI&gt;Double check your LUT configuration. In the following community post it is mentioned how a customer solved a similar issue by making some changes to the LUT: &lt;A href="https://community.nxp.com/t5/i-MX-RT/FlexSpi-NOR-and-NAND-Flash-Configuration/m-p/1083876" target="_blank"&gt;FlexSpi NOR and NAND Flash Configuration - NXP Community&lt;/A&gt;. Double check the &lt;EM&gt;flexspi_device_config_t deviceconfig&lt;/EM&gt;, and the &lt;EM&gt;customLUT&lt;/EM&gt;&amp;nbsp;for your NAND Flash.&lt;/LI&gt;
&lt;LI&gt;Finally, you could double check the initialization of FlexSPI in &lt;EM&gt;flexspi_nor_flash_init()&lt;/EM&gt; and &lt;EM&gt;&lt;A href="https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus/i-mx-rt1160-crossover-mcu-dual-core-arm-cortex-m7-and-cortex-m4:i.MX-RT1160" target="_self"&gt;i.MX RT1160 Processor Reference Manual&lt;/A&gt;. Section 30.5. Initialization.&lt;/EM&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-align-justify"&gt;Best regards, Raul.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 16:25:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MX-RT-FlexSPI-get-vendor-id-always-returns-0/m-p/1724048#M26844</guid>
      <dc:creator>RaRo</dc:creator>
      <dc:date>2023-09-15T16:25:36Z</dc:date>
    </item>
  </channel>
</rss>

