<?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: Problem with flashloader on FLEXSPI2 Instance B</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Problem-with-flashloader-on-FLEXSPI2-Instance-B/m-p/1699308#M210302</link>
    <description>&lt;P&gt;I have solved the problem but i am not sure if its the proper way.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;STEP0.0)&lt;BR /&gt;Burn the fuses via&amp;nbsp;NXP-MCUBootUtility.exe.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cattura1.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235105iE686F0BE9627FDBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cattura1.PNG" alt="Cattura1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;STEP 0.1)&lt;BR /&gt;You need to modify in some project the &lt;STRONG&gt;const flexspi_nor_config_t qspiflash_config&lt;/STRONG&gt; data structure present in "&lt;STRONG&gt;evkmimxrt1170_flexspi_nor_config.c&lt;/STRONG&gt;" according to your memory. in particular change the &lt;STRONG&gt;.sflashA1Size&lt;/STRONG&gt;&amp;nbsp;field to &lt;STRONG&gt;.sflashB1Size.&lt;BR /&gt;&lt;/STRONG&gt;I have made a blinky project for this test purpose.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;Compile and generate HEX file with the new 512byte of memory configuration data that will be written at address 0x60000400.&lt;BR /&gt;Set your custom board to serial downloader mode and via&amp;nbsp;NXP-MCUBootUtility.exe and connect to flashloader.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nor config.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235103i409558987F225DFC/image-size/large?v=v2&amp;amp;px=999" role="button" title="nor config.PNG" alt="nor config.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;STEP 0.2)&lt;BR /&gt;In "Boot Device Memory" page, browse your HEX file and put the data into qspi memory present at FLEXSPI2 instance B port.&lt;BR /&gt;from this point if you put your bord into "boot from fuses mode", and reset it, it should start blink.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0x60000000.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235106iCC333D3697DC7071/image-size/large?v=v2&amp;amp;px=999" role="button" title="0x60000000.PNG" alt="0x60000000.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BACK TO FLASHLOADER USED FOR DEBUG WITH MCU IDE&lt;BR /&gt;&lt;/STRONG&gt;You need to build it, there's no way to use existing ones. &lt;STRONG&gt;You MUST&lt;/STRONG&gt; to do point 0.0 and 0.1 because the ROM API needs to find those 512 bytes at adress 0x60000400 or debugger will give the following error:&lt;/P&gt;&lt;P&gt;"Flash variant 'iMXRT1170_SFDP_FlexSPI2_A_QSPI Aug 3 2023 11:35:30' detected (0B = at 0x60000000)&lt;BR /&gt;driver describes no sectors starting at 0x60000000&lt;BR /&gt;Flash Driver V.2 startup failed"&lt;/P&gt;&lt;P&gt;Unzip the&lt;STRONG&gt; iMXRT117x_FlexSPI_SFDP.zip&lt;/STRONG&gt;&amp;nbsp;and open in workspace the project &lt;STRONG&gt;iMXRT117x_FlexSPI_SFDP &lt;/STRONG&gt;and the &lt;STRONG&gt;LPCXFlashDriverLib.&lt;BR /&gt;&lt;/STRONG&gt;You fill find them&lt;STRONG&gt; in&amp;nbsp;C:\nxp\MCUXpressoIDE_11.6.1_8255\ide\Examples\Flashdrivers\NXP\iMXRT.&lt;BR /&gt;&lt;/STRONG&gt;Use an existing build configuration (for example the&amp;nbsp;MIMXRT1170_FlexSPI2_A_SFDP_QSPI) and build it.&lt;BR /&gt;if you get some errors fix the linker settings as follow:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FD0.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235108iB92F46082FEAFFEF/image-size/large?v=v2&amp;amp;px=999" role="button" title="FD0.PNG" alt="FD0.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Steps to modify the FLASHLOADER:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;1)&lt;/STRONG&gt; in test_main.c uncomment the line 63 "&lt;STRONG&gt;uint32_t FlashSize = flashConfig.memConfig.sflashB1Size&lt;/STRONG&gt;;" and cooment&amp;nbsp; the line 62 "&lt;STRONG&gt;uint32_t FlashSize = flashConfig.memConfig.sflashA1Size&lt;/STRONG&gt;;"&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;2)&lt;/STRONG&gt; &lt;STRONG&gt;FLEXSPI_NOR_INSTANCE&lt;/STRONG&gt; must be 2 and &lt;STRONG&gt;FLASH_BASE_ADDR&lt;/STRONG&gt; must be 0x60000000&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;3)&lt;/STRONG&gt; Change the&amp;nbsp;&lt;STRONG&gt;#define CONFIG_OPTION0&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;#define CONFIG_OPTION1&lt;/STRONG&gt; to&amp;nbsp;#define CONFIG_OPTION0 0xC1000000 and&amp;nbsp;#define CONFIG_OPTION1 0x20000000. Those fields may change according to your memory - look&amp;nbsp; at page 366 of processor reference manual&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;4)&lt;/STRONG&gt; In FlashPrg.c lines 217-221 you need to modify the&amp;nbsp;&lt;BR /&gt;FlashDevice.szDev = flashConfig.memConfig.sflashA1&lt;SPAN&gt;Size;&lt;BR /&gt;to&lt;BR /&gt;FlashDevice.szDev = flashConfig.memConfig.sflashB1&lt;SPAN&gt;Size;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG&gt;Important: Dont try to define PORT_B or somehow the flashloader will crash telling you that it does not recognise the version.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1234.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235110i0407A7F2873B23AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="1234.png" alt="1234.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;5)&lt;/STRONG&gt; Compile the flashloader.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;6)&lt;/STRONG&gt; Put your &lt;STRONG&gt;.axf&lt;/STRONG&gt; file to your project folder and rename it to "somethingyouwant"&lt;STRONG&gt;.cfx &lt;/STRONG&gt;(the flashloader is recognized only as .cfx file).&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;7) &lt;/STRONG&gt;In your project set the flash to 0x60000000 Location (That's FLEXSPI2 address) and change the flashloader to what you have created before.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt;&lt;/STRONG&gt; Debug the project. In my case there's an error that i need still to investigate but click ok and go over.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5678.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235117i3E8EA6D5C8C9C021/image-size/large?v=v2&amp;amp;px=999" role="button" title="5678.png" alt="5678.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now you have the control of the debug procedure with standard breakpoint at main.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="console.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235118iDDB3B9B803BAB27D/image-size/large?v=v2&amp;amp;px=999" role="button" title="console.PNG" alt="console.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I hope that this helps you to get out of the imxrt flashloaders and spi alternative boot &lt;STRONG&gt;hell&lt;/STRONG&gt;.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Aug 2023 09:24:33 GMT</pubDate>
    <dc:creator>Stulinaz</dc:creator>
    <dc:date>2023-08-04T09:24:33Z</dc:date>
    <item>
      <title>Problem with flashloader on FLEXSPI2 Instance B</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Problem-with-flashloader-on-FLEXSPI2-Instance-B/m-p/1697534#M210128</link>
      <description>&lt;P&gt;I have a problem with Flashloader for IMXRT1176 on Flexspi2 Instance B.&lt;BR /&gt;&lt;BR /&gt;I have designed my custom board with QSPI flash on the following pins:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FLEXSPI.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/234732iC915373185F7F959/image-size/large?v=v2&amp;amp;px=999" role="button" title="FLEXSPI.PNG" alt="FLEXSPI.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Following the Reference Manual at page 266 and a lot of topics in this forum related on the same flash problems, those pins are related to FLEXSPI2 intsance B.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="flexspi2.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/234734iDFF05340E03C1878/image-size/large?v=v2&amp;amp;px=999" role="button" title="flexspi2.PNG" alt="flexspi2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Very good. Now its fuse problem time.&lt;BR /&gt;&lt;BR /&gt;I have plugged via Jtag my board and with&amp;nbsp;NXP-MCUBootUtility.exe i have read the default value of fuses that are the following ones.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cattura.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/234735i9DDD97E4E13CC3C3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cattura.PNG" alt="Cattura.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I need to modify only the follwing fuses to get the bootloader working on those pins:&lt;BR /&gt;FLEXSPI_INSTANCE fuse to 1 (pag 266 RM)&lt;BR /&gt;FLEXSPI_PIN_GROUP_SEL fuse bit to 0.&amp;nbsp; (pag 266 RM)&lt;BR /&gt;FLASH_CONNECTION_SEL to a value of 2.&lt;BR /&gt;I have stuff connected on GPIO BOOT PIN so i need also to modify the BT_FUSE_SEL fuse bit.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cattura1.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/234736iF312D44E1ADE3D87/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cattura1.PNG" alt="Cattura1.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;And here are the fuse bit updated via serial dowloader mode.&lt;/P&gt;&lt;P&gt;I restarted the board and in BOOT FROM FUSES MODE&amp;nbsp;(BOOT_MODE[1:0] = 00b) and i correctly see bootloader try to boot from FLEXSPI2 PORT B (i see the CS going down and clock at 30 Mhz).&lt;BR /&gt;&lt;BR /&gt;Now the are missing the 512 byte of data at address 0x200 of Flash memory so i need to modify the&amp;nbsp;iMXRT117x_FlexSPI_SFDP project present at the path&amp;nbsp;C:\nxp\MCUXpressoIDE_11.6.1_8255\ide\Examples\Flashdrivers\NXP\iMXRT.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;HERE COMES THE PROBLEM:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;I have modify the booloader project with only the instance of 2.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="codeCattura.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/234739i965A2CC99BF6B551/image-size/large?v=v2&amp;amp;px=999" role="button" title="codeCattura.PNG" alt="codeCattura.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;When testing with oscilloscope,&lt;BR /&gt;i notice that the clock is not present on the pin GPIO_EMC_B2_09 (here is my qspi connected - flexspi2 instance B) but its present on the pin GPIO_EMC_B2_10 (Thats' FLEXSPI 2 Instance A).&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Do i miss something?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Why is the bootloader correctly probe the flexspi at position B(FLEXSPI2 Instance B) but when i try the flashloader project it swaps to FLEXSPI2 Instance A?&lt;BR /&gt;It seems to me that the bootloader skips the CONNECTION_SEL fuse bit.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/61241"&gt;@jingpan&lt;/a&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/40101"&gt;@jay_heng&lt;/a&gt;&lt;BR /&gt;&lt;/STRONG&gt;Thank You all for the help.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 10:43:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Problem-with-flashloader-on-FLEXSPI2-Instance-B/m-p/1697534#M210128</guid>
      <dc:creator>Stulinaz</dc:creator>
      <dc:date>2023-08-02T10:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with flashloader on FLEXSPI2 Instance B</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Problem-with-flashloader-on-FLEXSPI2-Instance-B/m-p/1698401#M210200</link>
      <description>&lt;P&gt;You need to reconfigure the following defines in Flashprg.c line 189-190:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;configOption.option0.U = &lt;EM&gt;CONFIG_OPTION0;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;EM&gt;configOption.option1.U&lt;/EM&gt; = CONFIG_OPTION1;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;from&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;#define CONFIG_OPTION0 0xC0000007&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;#define CONFIG_OPTION1 0x00000000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;to&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;#define CONFIG_OPTION0 0xC1000007&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;#define CONFIG_OPTION1 0x2000000&lt;BR /&gt;&lt;BR /&gt;after doing this, the flexspi2 instance B correctly probe the memory.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;i have compiled the new flashloader but when trying to use it, the debugger crash with the following error:&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="errno.PNG" style="width: 969px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/234915iEA7BC7283215D781/image-size/large?v=v2&amp;amp;px=999" role="button" title="errno.PNG" alt="errno.PNG" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 07:52:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Problem-with-flashloader-on-FLEXSPI2-Instance-B/m-p/1698401#M210200</guid>
      <dc:creator>Stulinaz</dc:creator>
      <dc:date>2023-08-03T07:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with flashloader on FLEXSPI2 Instance B</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Problem-with-flashloader-on-FLEXSPI2-Instance-B/m-p/1698937#M210257</link>
      <description>&lt;P&gt;Hello, my name is Pavel, and I will be supporting your case, I review your information, but I review your pins for FlexSPI 2 Secondary Group Pin, I do not know how you got this info I suggest review the reference manual.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pavel_Hernandez_0-1691106043868.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235017i9682B47F002AC096/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pavel_Hernandez_0-1691106043868.png" alt="Pavel_Hernandez_0-1691106043868.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The SCK is in the GPIO_SD_B1_01.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pavel_Hernandez_1-1691106154575.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235018i9032D63BE07EB2FC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pavel_Hernandez_1-1691106154575.png" alt="Pavel_Hernandez_1-1691106154575.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Could you try to do a mass erase for the last error.&lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/RT-board-recovery-for-debugger-connect-issues/ta-p/1635260" target="_blank"&gt;RT board recovery for debugger connect issues - NXP Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Pavel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 23:48:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Problem-with-flashloader-on-FLEXSPI2-Instance-B/m-p/1698937#M210257</guid>
      <dc:creator>Pavel_Hernandez</dc:creator>
      <dc:date>2023-08-03T23:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with flashloader on FLEXSPI2 Instance B</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Problem-with-flashloader-on-FLEXSPI2-Instance-B/m-p/1699308#M210302</link>
      <description>&lt;P&gt;I have solved the problem but i am not sure if its the proper way.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;STEP0.0)&lt;BR /&gt;Burn the fuses via&amp;nbsp;NXP-MCUBootUtility.exe.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cattura1.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235105iE686F0BE9627FDBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cattura1.PNG" alt="Cattura1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;STEP 0.1)&lt;BR /&gt;You need to modify in some project the &lt;STRONG&gt;const flexspi_nor_config_t qspiflash_config&lt;/STRONG&gt; data structure present in "&lt;STRONG&gt;evkmimxrt1170_flexspi_nor_config.c&lt;/STRONG&gt;" according to your memory. in particular change the &lt;STRONG&gt;.sflashA1Size&lt;/STRONG&gt;&amp;nbsp;field to &lt;STRONG&gt;.sflashB1Size.&lt;BR /&gt;&lt;/STRONG&gt;I have made a blinky project for this test purpose.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;Compile and generate HEX file with the new 512byte of memory configuration data that will be written at address 0x60000400.&lt;BR /&gt;Set your custom board to serial downloader mode and via&amp;nbsp;NXP-MCUBootUtility.exe and connect to flashloader.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nor config.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235103i409558987F225DFC/image-size/large?v=v2&amp;amp;px=999" role="button" title="nor config.PNG" alt="nor config.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;STEP 0.2)&lt;BR /&gt;In "Boot Device Memory" page, browse your HEX file and put the data into qspi memory present at FLEXSPI2 instance B port.&lt;BR /&gt;from this point if you put your bord into "boot from fuses mode", and reset it, it should start blink.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0x60000000.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235106iCC333D3697DC7071/image-size/large?v=v2&amp;amp;px=999" role="button" title="0x60000000.PNG" alt="0x60000000.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BACK TO FLASHLOADER USED FOR DEBUG WITH MCU IDE&lt;BR /&gt;&lt;/STRONG&gt;You need to build it, there's no way to use existing ones. &lt;STRONG&gt;You MUST&lt;/STRONG&gt; to do point 0.0 and 0.1 because the ROM API needs to find those 512 bytes at adress 0x60000400 or debugger will give the following error:&lt;/P&gt;&lt;P&gt;"Flash variant 'iMXRT1170_SFDP_FlexSPI2_A_QSPI Aug 3 2023 11:35:30' detected (0B = at 0x60000000)&lt;BR /&gt;driver describes no sectors starting at 0x60000000&lt;BR /&gt;Flash Driver V.2 startup failed"&lt;/P&gt;&lt;P&gt;Unzip the&lt;STRONG&gt; iMXRT117x_FlexSPI_SFDP.zip&lt;/STRONG&gt;&amp;nbsp;and open in workspace the project &lt;STRONG&gt;iMXRT117x_FlexSPI_SFDP &lt;/STRONG&gt;and the &lt;STRONG&gt;LPCXFlashDriverLib.&lt;BR /&gt;&lt;/STRONG&gt;You fill find them&lt;STRONG&gt; in&amp;nbsp;C:\nxp\MCUXpressoIDE_11.6.1_8255\ide\Examples\Flashdrivers\NXP\iMXRT.&lt;BR /&gt;&lt;/STRONG&gt;Use an existing build configuration (for example the&amp;nbsp;MIMXRT1170_FlexSPI2_A_SFDP_QSPI) and build it.&lt;BR /&gt;if you get some errors fix the linker settings as follow:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FD0.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235108iB92F46082FEAFFEF/image-size/large?v=v2&amp;amp;px=999" role="button" title="FD0.PNG" alt="FD0.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Steps to modify the FLASHLOADER:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;1)&lt;/STRONG&gt; in test_main.c uncomment the line 63 "&lt;STRONG&gt;uint32_t FlashSize = flashConfig.memConfig.sflashB1Size&lt;/STRONG&gt;;" and cooment&amp;nbsp; the line 62 "&lt;STRONG&gt;uint32_t FlashSize = flashConfig.memConfig.sflashA1Size&lt;/STRONG&gt;;"&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;2)&lt;/STRONG&gt; &lt;STRONG&gt;FLEXSPI_NOR_INSTANCE&lt;/STRONG&gt; must be 2 and &lt;STRONG&gt;FLASH_BASE_ADDR&lt;/STRONG&gt; must be 0x60000000&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;3)&lt;/STRONG&gt; Change the&amp;nbsp;&lt;STRONG&gt;#define CONFIG_OPTION0&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;#define CONFIG_OPTION1&lt;/STRONG&gt; to&amp;nbsp;#define CONFIG_OPTION0 0xC1000000 and&amp;nbsp;#define CONFIG_OPTION1 0x20000000. Those fields may change according to your memory - look&amp;nbsp; at page 366 of processor reference manual&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;4)&lt;/STRONG&gt; In FlashPrg.c lines 217-221 you need to modify the&amp;nbsp;&lt;BR /&gt;FlashDevice.szDev = flashConfig.memConfig.sflashA1&lt;SPAN&gt;Size;&lt;BR /&gt;to&lt;BR /&gt;FlashDevice.szDev = flashConfig.memConfig.sflashB1&lt;SPAN&gt;Size;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG&gt;Important: Dont try to define PORT_B or somehow the flashloader will crash telling you that it does not recognise the version.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1234.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235110i0407A7F2873B23AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="1234.png" alt="1234.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;5)&lt;/STRONG&gt; Compile the flashloader.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;6)&lt;/STRONG&gt; Put your &lt;STRONG&gt;.axf&lt;/STRONG&gt; file to your project folder and rename it to "somethingyouwant"&lt;STRONG&gt;.cfx &lt;/STRONG&gt;(the flashloader is recognized only as .cfx file).&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;7) &lt;/STRONG&gt;In your project set the flash to 0x60000000 Location (That's FLEXSPI2 address) and change the flashloader to what you have created before.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt;&lt;/STRONG&gt; Debug the project. In my case there's an error that i need still to investigate but click ok and go over.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5678.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235117i3E8EA6D5C8C9C021/image-size/large?v=v2&amp;amp;px=999" role="button" title="5678.png" alt="5678.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now you have the control of the debug procedure with standard breakpoint at main.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="console.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235118iDDB3B9B803BAB27D/image-size/large?v=v2&amp;amp;px=999" role="button" title="console.PNG" alt="console.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I hope that this helps you to get out of the imxrt flashloaders and spi alternative boot &lt;STRONG&gt;hell&lt;/STRONG&gt;.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 09:24:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Problem-with-flashloader-on-FLEXSPI2-Instance-B/m-p/1699308#M210302</guid>
      <dc:creator>Stulinaz</dc:creator>
      <dc:date>2023-08-04T09:24:33Z</dc:date>
    </item>
  </channel>
</rss>

