<?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: blhost fails to erase flash region in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1642607#M24854</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/213046"&gt;@Mike_B&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;we are in the May Day Vocation now, if you have any updated information, I will reply you after back to work from 5.4, thanks a lot for your understanding.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kerry&lt;/P&gt;</description>
    <pubDate>Mon, 01 May 2023 07:32:12 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2023-05-01T07:32:12Z</dc:date>
    <item>
      <title>blhost fails to erase flash region</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1640814#M24820</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Our Hardware&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We have developed a custom PCB based around the MIMXRT1021CAG4A. There are some layout differences, but our board is similar to the RT1020 dev board (MIMXRT1020-EVK) except we use the W25Q64JVS not the IS25LP064A. We use the following hardware:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;MCU: MIMXRT1021CAG4A (144 pin LQFP)&lt;/LI&gt;&lt;LI&gt;SDRAM: IS42S16160J-6TL (16 Mbit, 166 MHz)&lt;/LI&gt;&lt;LI&gt;NOR Flash: W25Q64JVS (64 Mbit, 133 MHz)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When attempting to use blhost to erase our flash chip we get the following failure:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="compare difference.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220981iEC533DD87A681740/image-size/large?v=v2&amp;amp;px=999" role="button" title="compare difference.PNG" alt="compare difference.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Failing board is on the left. Working board is on the right.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;More Background&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;We have tested 9 boards and so far 7 boards have this issue&lt;/LI&gt;&lt;LI&gt;We have tried swapping in a new flash chip but get the same result&lt;/LI&gt;&lt;LI&gt;Traces are routed the same on working boards vs non-working boards&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;My question&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Why might the command &lt;EM&gt;flash-erase-region&lt;/EM&gt; fail on some boards but not others?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 17:55:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1640814#M24820</guid>
      <dc:creator>Mike_B</dc:creator>
      <dc:date>2023-04-26T17:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: blhost fails to erase flash region</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1641248#M24829</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/213046"&gt;@Mike_B&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Please check the flexSPI DQS pin,&amp;nbsp;GPIO_SD_B1_05, do you use it as other function or not?&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;This pin should leave it as float, otherwise, it will influence the flexSPI communication.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Do you also enable the QE bit?&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You can test this code in your RAM at first:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;SDK_2_13_0_EVK-MIMXRT1020\boards\evkmimxrt1020\driver_examples\flexspi\nor\polling_transfer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Please note, to check the QE bit position, you can check your QSPI flash datasheet find the correct QE position.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wish it helps you!&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kerry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 06:12:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1641248#M24829</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2023-04-27T06:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: blhost fails to erase flash region</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1642408#M24850</link>
      <description>&lt;P&gt;Hi Kerry,&lt;/P&gt;&lt;P&gt;Thank you for the reply. Pin 26 (GPIO_SD_B1_05) is floating.&lt;/P&gt;&lt;P&gt;Also, we cannot execute out of the external flash. For example, I can run evkmimxrt1020_iled_blinky (that is, the LED turns off and on) when my memory configuration is as follows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mike_B_0-1682707669844.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/221272i1ED1B78A1C49F10E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mike_B_0-1682707669844.png" alt="Mike_B_0-1682707669844.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But when I try to execute evkmimxrt1020_iled_blinky with the following memory configuration:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mike_B_1-1682707687902.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/221273i70249352D7EF0A87/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mike_B_1-1682707687902.png" alt="Mike_B_1-1682707687902.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My stack usage is hosed before the fist line of code executes:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mike_B_2-1682707701076.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/221274i462EAB3C547B96FC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mike_B_2-1682707701076.png" alt="Mike_B_2-1682707701076.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And I get this hard fault when I try run the program:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mike_B_3-1682707713190.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/221275i88B0EF6B134A3B70/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mike_B_3-1682707713190.png" alt="Mike_B_3-1682707713190.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So running code that requires use of the board flash (such as SDK_2_13_0_EVK-MIMXRT1020\boards\evkmimxrt1020\driver_examples\flexspi\nor\polling_transfer) may not be an option for me at this point.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 18:49:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1642408#M24850</guid>
      <dc:creator>Mike_B</dc:creator>
      <dc:date>2023-04-28T18:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: blhost fails to erase flash region</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1642607#M24854</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/213046"&gt;@Mike_B&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;we are in the May Day Vocation now, if you have any updated information, I will reply you after back to work from 5.4, thanks a lot for your understanding.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kerry&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 07:32:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1642607#M24854</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2023-05-01T07:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: blhost fails to erase flash region</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1643293#M24870</link>
      <description>&lt;P&gt;To try to convince myself that this problem is not due to a bad chip or a routing issue, I removed the flash chip from the board and dead-bugged a new one to the MCU. Still getting command failure 20106 as described above. As a sanity check I removed the flash chip completely and again tried to program the flash chip. This time I got command failure 1004.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;### Erase memory before writing image ###&lt;BR /&gt;blhost -t 50210 -u 0x15A2,0x0073 -j -- flash-erase-region 0x60000000 21040 9&lt;BR /&gt;WARNING:spsdk.mboot.mcuboot:Note: memoryId is not required when accessing mapped external memory&lt;BR /&gt;ERROR:spsdk.mboot.interfaces.usb:Cannot read from HID device, error=0&lt;BR /&gt;{&lt;BR /&gt;"command": "flash-erase-region",&lt;BR /&gt;"response": [],&lt;BR /&gt;"status": {&lt;BR /&gt;"description": "10004 (0x2714) No response packet from target device.",&lt;BR /&gt;"value": 10004&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;To me this implies that our flash chip is at least able to send a response packet to the MCU, meaning that the flash chip and MCU are able to communicate. But for some reason the Secure Provisioning Tool can’t or won’t erase the flash chip.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 20:32:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1643293#M24870</guid>
      <dc:creator>Mike_B</dc:creator>
      <dc:date>2023-05-02T20:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: blhost fails to erase flash region</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1644440#M24890</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/213046"&gt;@Mike_B&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Thanks for your patience!&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SDK_2_13_0_EVK-MIMXRT1020\boards\evkmimxrt1020\driver_examples\flexspi\nor\polling_transfer&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The above code totally can run in the internal RAM, not the external flash.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please debug the above code to check the details in RAM.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kerryzhou_0-1683187857873.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/221692i05F16C3FC716EFC5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kerryzhou_0-1683187857873.png" alt="kerryzhou_0-1683187857873.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Check the Link application to RAM, then code will run in internal RAM, this will help you to debug the flexSPI external flash.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;kerry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 08:11:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1644440#M24890</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2023-05-04T08:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: blhost fails to erase flash region</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1652204#M25080</link>
      <description>&lt;P&gt;This turned out to be an issue with how the Secure Provisioning Tool was configured. I had selected "FlexSPI NOR/user FCB file" in the "from" pull down menu, which worked for some boards but not others (don't know why). However, when I use "FlexSPI NOR/W25Q32JV" I am able to erase and write to all boards without issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mike_B_0-1684339024898.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/223633i87919057F5920621/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mike_B_0-1684339024898.png" alt="Mike_B_0-1684339024898.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We are actually using the&amp;nbsp;&lt;SPAN&gt;W25Q64JVS&amp;nbsp;and not the&amp;nbsp;W25Q32JVS, so I am not yet sure if this will be an issue. But we are at least getting off the ground. Thank you very much for the help.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 16:00:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/blhost-fails-to-erase-flash-region/m-p/1652204#M25080</guid>
      <dc:creator>Mike_B</dc:creator>
      <dc:date>2023-05-17T16:00:18Z</dc:date>
    </item>
  </channel>
</rss>

