<?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: Run bootloader from application rt1062 in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1292155#M14693</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;I was wondering if you can share the complete demo code, as it can help me to figure it out.&lt;BR /&gt;Looking forward to your reply.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jun 2021 00:40:13 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2021-06-15T00:40:13Z</dc:date>
    <item>
      <title>Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1282335#M14372</link>
      <description>&lt;P align="left"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;Hi,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;I am using a Embedded Artists &lt;STRONG&gt;imx-rt1062-developers-kit &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;with the following&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;SDK: &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;eaimxrt1062_sdk_2.8.6_freertos&lt;/STRONG&gt;. &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;I am trying to run the bootloader in ROM from an application.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;The bootloader API tree and the following function is defined in bl_api.c&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#define g_bootloaderTree (*(bootloader_api_entry_t**)(0x0020001c))

void bl_serial_downloader()
{
run_bootloader_ctx_t boot_para;
boot_para.B.imageIndex = 0;
boot_para.B.serialBootInterface = kEnterBootloader_SerialInterface_USB;
boot_para.B.bootMode = kEnterBootloader_Mode_SerialDownloader;
boot_para.B.tag = kEnterBootloader_Tag;
g_bootloaderTree-&amp;gt;runBootloader((void *)&amp;amp;boot_para);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;Since I am using FreeRTOS and I suspend all other tasks and disable the interrupts. This is how I call the bl_serial_downloader function:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;vTaskSuspendAll();
taskDISABLE_INTERRUPTS();
bl_serial_downloader();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;I have placed the bl_api &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;and the following files &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;in RAM &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;and &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;excluded&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt; them from &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;the Flash memory. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;This is the “data.ldt” file:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;#if memory.name=="SRAM_ITC"&amp;gt;
*mflash_drv.o(.text .text* .rodata .rodata*)
*fsl_flexspi.o(.text .text* .rodata .rodata*)
&amp;lt;/#if&amp;gt;

&amp;lt;#if memory.name=="SRAM_OC"&amp;gt;
*bl_api.o(.text .tVext* .rodata .rodata* .constdata .constdata.*)
*fsl_rtwdog.o(.text .tVext* .rodata .rodata* .constdata .constdata.*)
*fsl_wdog.o(.text .tVext* .rodata .rodata* .constdata .constdata.*)
&amp;lt;/#if&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;This is the Memory Layout:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;memory id="RAM" size="1024" type="RAM"

memoryInstance derived_from="Flash" driver="MIMXRT1050-EcoXiP_ATXP032.cfx" edited="true" id="BOARD_FLASH" location="0x60000000" size="0x400000"

memoryInstance derived_from="RAM" edited="true" id="BOARD_SDRAM" location="0x80000000" size="0x1000000"

memoryInstance derived_from="RAM" edited="true" id="NCACHE_REGION" location="0x81e00000" size="0x1000000"

memoryInstance derived_from="RAM" edited="true" id="SRAM_DTC" location="0x20000000" size="0x20000"

memoryInstance derived_from="RAM" edited="true" id="SRAM_ITC" location="0x0" size="0x20000"

memoryInstance derived_from="RAM" edited="true" id="SRAM_OC" location="0x20200000" size="0xc0000"&lt;/LI-CODE&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Monospace"&gt;When I try to flash with the Secure Provisioning Tool I get the following error:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;20107 (0x4E8B) kStatus_FlexSPINOR_SFDP_NotFound&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the commands that Secure Provision Tool are trying to send:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$blhost -u 0x15A2,0x0073 -j -- get-property 1 0
blhost failed
FlashLoader is not running yet, download and run it
$sdphost -u 0x1FC9,0x0135 -j – error-status
sdphost succeeded, HAB disabled
$sdphost -u 0x1FC9,0x0135 -j -- write-file 0x20000000 /opt/nxp/MCUX_Provi_v2.1/bin/data/targets/MIMXRT1060/ivt_flashloader.bin
$sdphost -u 0x1FC9,0x0135 -j -- jump-address 0x20000400
$blhost -u 0x15A2,0x0073 -j -- get-property 1 0
$blhost -u 0x15A2,0x0073 -j -- fill-memory 0x2000 4 0xC0803007 word
$blhost -u 0x15A2,0x0073 -j -- fill-memory 0x2004 4 0x00000000 word
$blhost -u 0x15A2,0x0073 -j -- configure-memory 9 0x2000
blhost failed - 20107 (0x4E8B) kStatus_FlexSPINOR_SFDP_NotFound&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which are exatly the same commands that are send when I flash when I press the "ISP enable" button on the board.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried the Flashloader SDK example and it gives the same error when I try to flash. From looking at the source code I suspects if fails in the following function:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;status_t flexspi_nor_read_sfdp_info(uint32_t instance, jedec_info_table_t *tbl, bool address_shift_enable)
{
status_t status = kStatus_FlexSPINOR_SFDP_NotFound;
do
{
if (tbl == NULL)
{
status = kStatus_InvalidArgument;
break;
}

sfdp_header_t sfdp_header;
uint32_t address;

status = flexspi_nor_read_sfdp(instance, 0, (uint32_t *)&amp;amp;sfdp_header, sizeof(sfdp_header));

if (status != kStatus_Success)
{
break;
}

if (sfdp_header.signature != SFDP_SIGNATURE)
{
status = kStatus_FlexSPINOR_SFDP_NotFound;
break;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From looking at the code I am not sure how the SFDP signature is supposed to be read correctly.&lt;/P&gt;&lt;P&gt;I hope someone can help me. Thanks in advance.&lt;/P&gt;&lt;P&gt;/Robert&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 07:13:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1282335#M14372</guid>
      <dc:creator>Robert123</dc:creator>
      <dc:date>2021-05-26T07:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1282483#M14377</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.&lt;BR /&gt;I'll test later and inform you ASAP.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 10:01:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1282483#M14377</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2021-05-26T10:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1286586#M14519</link>
      <description>&lt;P&gt;I have made a small example project from the iled_blinky SDK example and added a call to the ROM bootloader. I still have the same issue.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 06:31:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1286586#M14519</guid>
      <dc:creator>Robert123</dc:creator>
      <dc:date>2021-06-03T06:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1287375#M14542</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Thanks for your sharing.&lt;BR /&gt;I port your code to the fsl_romapi and run the code demo on the MIMXRT1060 EVK board.&lt;BR /&gt;Actually, it can enter the serial downloader mode successfully (as the below figure shows), the attachment is my testing code.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-06-04_16-24-39.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/146264iD3C346EB6EF9A842/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-06-04_16-24-39.png" alt="2021-06-04_16-24-39.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 08:29:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1287375#M14542</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2021-06-04T08:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1288042#M14562</link>
      <description>&lt;P&gt;Hi, I upgraded the SDK version to 2.9.3 (from Embedded Artists &lt;A href="http://imx.embeddedartists.com/" target="_blank"&gt;http://imx.embeddedartists.com/&lt;/A&gt;). I have the following board: &lt;A href="https://www.embeddedartists.com/products/imx-rt1062-developers-kit/" target="_blank"&gt;https://www.embeddedartists.com/products/imx-rt1062-developers-kit/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I still get the same error and it stops after:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/* Setup FLEXSPI NOR Configuration Block */
status = ROM_FLEXSPI_NorFlash_GetConfig(FlexSpiInstance, &amp;amp;norConfig, &amp;amp;option);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;And prints "Get FLEXSPI NOR configuration block failure" with status = 20107&lt;/P&gt;&lt;P&gt;I also tested the SDK example in 2.9.3 called "fsl_romapi" and it also cannot setup the FLEXSPI NOR Configuration Block.&lt;/P&gt;&lt;P&gt;I have tested both to flash with the Debugger (Segger J-link) and with the Secure Provision Tool (see attached picture)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 07:50:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1288042#M14562</guid>
      <dc:creator>Robert123</dc:creator>
      <dc:date>2021-06-07T07:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1288178#M14568</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;I've run the fsl_romapi on the MIMXRT1060 EVK board and it works well.&lt;BR /&gt;As we know, the onboard QSPI is different between the MIMXRT1060 EVK and Embedded Artists iMX RT1062 OEM board&lt;BR /&gt;Can you illustrate the difference of the fsl_romapi demo between the original and Embedded Artists's version? It may help me to figure it out.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 09:36:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1288178#M14568</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2021-06-07T09:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1288270#M14575</link>
      <description>&lt;P&gt;Here is a git diff between the EAIMXRT1062 and the EVK-MIMXRT1060 for the fsl_rom_api SDK example, both are using SDK version 2.9.3.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 12:04:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1288270#M14575</guid>
      <dc:creator>Robert123</dc:creator>
      <dc:date>2021-06-07T12:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1289173#M14600</link>
      <description>&lt;P&gt;Here is the ReadMe written by Embedded Artists found in the folder "doc". Which describes what has been patched by Embedded Artists from the original SDK example&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 13:44:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1289173#M14600</guid>
      <dc:creator>Robert123</dc:creator>
      <dc:date>2021-06-08T13:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1289558#M14612</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Thanks for your reply. In my opinion, &lt;BR /&gt;it's better to contact the Embedded Artists about the phenomenon too, they may give us new insights.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 03:23:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1289558#M14612</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2021-06-09T03:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1289625#M14615</link>
      <description>&lt;P&gt;Hi, I have contacted Embedded Artists. Since the QSPI Flash is different from the original NXP development board the LUT for the memory needs to be updated/configured. I will mark this as complete and post an update later if I succeed with the LUT configuration. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 05:48:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1289625#M14615</guid>
      <dc:creator>Robert123</dc:creator>
      <dc:date>2021-06-09T05:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1290584#M14638</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried to update the LUT in the boot header but was unsuccessful.&lt;/P&gt;&lt;P&gt;According to the Adesto XIP datasheet (&lt;A href="https://www.dialog-semiconductor.com/sites/default/files/2021-04/DS-ATXP032-114I-042020_0.pdf" target="_blank"&gt;https://www.dialog-semiconductor.com/sites/default/files/2021-04/DS-ATXP032-114I-042020_0.pdf&lt;/A&gt;) the LUT command is 0x5A&lt;/P&gt;&lt;P&gt;According to table 9-16 in the IMXRT1060RM.pdf the Index for reading SFPD is 13 so I added&lt;/P&gt;&lt;P&gt;#define EXIP_CMD_READ_SFDP 0x5A // Read SFPD&lt;/P&gt;&lt;P&gt;[13] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, EXIP_CMD_READ_SFDP, RADDR_SDR, FLEXSPI_1PAD, 24)&lt;/P&gt;&lt;P&gt;to the boot header defined in &lt;STRONG&gt;evkmimxrt1060_flexspi_nor_config.c&lt;/STRONG&gt;:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#define EXIP_CMD_READ_SFDP 0x5A // Read SFPD

#if defined(XIP_BOOT_HEADER_ENABLE) &amp;amp;&amp;amp; (XIP_BOOT_HEADER_ENABLE == 1)
#if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__)
__attribute__((section(".boot_hdr.conf"), used))
#elif defined(__ICCARM__)
#pragma location = ".boot_hdr.conf"
#endif

const flexspi_nor_config_t qspiflash_config = {
    .memConfig =
    {
        .tag = FLEXSPI_CFG_BLK_TAG,
        .version = FLEXSPI_CFG_BLK_VERSION,
        .readSampleClksrc=kFlexSPIReadSampleClk_ExternalInputFromDqsPad,
        .csHoldTime = 3u,
        .csSetupTime = 3u,
        .columnAddressWidth = 0u,
        .deviceModeCfgEnable = 1,
        // Sequence for changing device mode. In this sequence we write to status/control regs 2-3.
        // This will switch EcoXiP to Octal-DDR mode and modify the number of dummy cycles used by it.
        .deviceModeSeq = {.seqId=14, .seqNum=1}, // index/size Status/Control Registers sequence
        .deviceModeArg = 0x88 | (CTRL_REG_BYTE3_VAL &amp;lt;&amp;lt; 8), // values to be written to status/control regs 2-3
        // Enable DDR mode, Safe configuration
        .controllerMiscOption = (1u &amp;lt;&amp;lt; kFlexSpiMiscOffset_DdrModeEnable) |
                                (1u &amp;lt;&amp;lt; kFlexSpiMiscOffset_SafeConfigFreqEnable),
        .deviceType = kFlexSpiDeviceType_SerialNOR, // serial NOR
        .sflashPadType = kSerialFlash_8Pads,
        .serialClkFreq = kFlexSpiSerialClk_133MHz,
        .lutCustomSeqEnable = 0, // Use pre-defined LUT sequence index and number
        .sflashA1Size = 4u * 1024u * 1024u,
        .dataValidTime = {[0] = 20}, //2ns from DQS to data
        .busyOffset = 0, // busy bit in bit 0
        .busyBitPolarity = 0, // busy bit is 1 when device is busy
        .lookupTable =
            {
                // Read
                [0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_8PAD, EXIP_CMD_READARRAY, RADDR_DDR, FLEXSPI_8PAD, 0x20),
                [1] = FLEXSPI_LUT_SEQ(DUMMY_DDR, FLEXSPI_8PAD,(ECOXIP_READ_NON_SPI_DUMMY_CYCLES*2+1), READ_DDR, FLEXSPI_8PAD, 0x80),
                // Read Status
                [4] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_8PAD, EXIP_CMD_READ_STATUS_REG_BYTE1, DUMMY_DDR, FLEXSPI_8PAD, 0x08),
                [5] = FLEXSPI_LUT_SEQ(READ_DDR, FLEXSPI_8PAD, 0x01, STOP, FLEXSPI_1PAD, 0x0),
                // Write Enable
                [12] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, EXIP_CMD_WRITE_ENABLE, STOP, FLEXSPI_1PAD, 0x0),
				// Read SFDP
				[13] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, EXIP_CMD_READ_SFDP, RADDR_SDR, FLEXSPI_1PAD, 24),

				// Write Status/Control Registers (this specifc sequence will writes 2 bytes to status/control regs 2-3)
                [56] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, EXIP_CMD_WRITE_STAT_CTRL_REGS, CMD_SDR, FLEXSPI_1PAD, 0x02),
                [57] = FLEXSPI_LUT_SEQ(WRITE_SDR, FLEXSPI_1PAD, 0x02, STOP, FLEXSPI_1PAD, 0x0),
            },
    },
    .pageSize = 256u,
    .sectorSize = 4096u, // 4K - that's actually a block not a sector (has to match erase size)
    .ipcmdSerialClkFreq = 1, // 30MHz
    .blockSize = 4096u,
    .isUniformBlockSize = true,
};
#endif /* XIP_BOOT_HEADER_ENABLE */&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will give the same error message as before.&lt;/P&gt;&lt;P&gt;For the Flashloader SDK example in function &lt;STRONG&gt;flexspi_nor_generate_config_block_adesto_octalflash, &lt;/STRONG&gt;the function tries to update the LUT with the following sequence:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        // Read SFDP LUT sequence for 1 pad instruction
        { FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, kSerialFlash_ReadSFDP, RADDR_SDR, FLEXSPI_1PAD, 24),
          FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_1PAD, 8, READ_SDR, FLEXSPI_1PAD, 0xFF), 0, 0 },&lt;/LI-CODE&gt;&lt;P&gt;with kSerialFlash_ReadSFDP = 0x5A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 08:48:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1290584#M14638</guid>
      <dc:creator>Robert123</dc:creator>
      <dc:date>2021-06-10T08:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1291103#M14654</link>
      <description>&lt;P&gt;Hi, &lt;BR /&gt;Thanks for your reply. &lt;BR /&gt;After digging deeper, I guess the issue may be related to the non-initial status of the FlexSPI module and external Flash chip, as we know, during the boot-up, both FlexSPI and external Flash chip will be configured by the ROM code.&lt;BR /&gt;So you can try to reset them prior to calling bl_serial_downloader() function, there's a software_reset project in the latest patched SDK from here: &lt;A href="http://imx.embeddedartists.com/#imxrt1062" target="_blank"&gt;http://imx.embeddedartists.com/#imxrt1062&lt;/A&gt;&lt;BR /&gt;for implementing the reset operation.&lt;BR /&gt;Please give it a try.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 05:58:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1291103#M14654</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2021-06-11T05:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1291856#M14686</link>
      <description>&lt;P&gt;Hi, have have tested to reset the flexspi pins (IOMUXC_SetPinMux and IOMUXC_SetPinConfig) before calling the bootloader but with no luck.&lt;/P&gt;&lt;P&gt;I have also tested reset the flexspi pins on the fsl_romapi example but it will give the same error message as before.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 10:08:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1291856#M14686</guid>
      <dc:creator>Robert123</dc:creator>
      <dc:date>2021-06-14T10:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1292155#M14693</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;I was wondering if you can share the complete demo code, as it can help me to figure it out.&lt;BR /&gt;Looking forward to your reply.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 00:40:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1292155#M14693</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2021-06-15T00:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Run bootloader from application rt1062</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1292309#M14698</link>
      <description>&lt;P&gt;Hi, I managed it to work now. I am not sure why it didn't work yesterday but maybe I forgot to run the application in RAM.&lt;/P&gt;&lt;P&gt;Here is the code (modified from the software_reset example) to reset the flexspi pins&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/*
 * JEDEC reset of external serial flash in two steps:
 * 1) Disable interrupts and the data cache
 * 2) Do the JEDEC reset sequence
 *
 * Note: This function must be executing in RAM.
 * Note: Function call only valid for targets running in/from
 *       flash - not for targets running in debugger and/or in RAM
 */
RAMFUNCTION_SECTION_CODE(void flexspi_reset(void))
{
#define CS  (1&amp;lt;&amp;lt;6)
#define SCK (1&amp;lt;&amp;lt;7)
#define SI  (1&amp;lt;&amp;lt;8)
#define RESETMASK   (CS|SCK|SI)
#define IGNOREPINS  ((1&amp;lt;&amp;lt;9)|(1&amp;lt;&amp;lt;10)|(1&amp;lt;&amp;lt;11)|(1&amp;lt;&amp;lt;1)|(1&amp;lt;&amp;lt;2)|(1&amp;lt;&amp;lt;3))
#define LOW(__mask)   GPIO3-&amp;gt;DR &amp;amp;= ~(__mask)  /* Set pin output to low level.*/
#define HIGH(__mask)  GPIO3-&amp;gt;DR |=  (__mask)  /* Set pin output to high level.*/

    __disable_irq();
    SCB_DisableDCache();

    /* Configure CS/SCK/SI as outputs and the other flexspi pins as inputs */
    CLOCK_EnableClock(kCLOCK_Gpio3);
    GPIO3-&amp;gt;IMR &amp;amp;= ~(RESETMASK | IGNOREPINS);
    GPIO3-&amp;gt;GDIR |= (RESETMASK);
    GPIO3-&amp;gt;GDIR &amp;amp;= ~(IGNOREPINS);

    IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_06_GPIO3_IO06,0);
    IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_07_GPIO3_IO07,0);
    IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_08_GPIO3_IO08,0);
    IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_09_GPIO3_IO09,0);
    IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_10_GPIO3_IO10,0);
    IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_11_GPIO3_IO11,0);
    IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_01_GPIO3_IO01,0);
    IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_02_GPIO3_IO02,0);
    IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_03_GPIO3_IO03,0);

    IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_06_GPIO3_IO06, 0x10b0);
    IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_07_GPIO3_IO07, 0x10b0);
    IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_08_GPIO3_IO08, 0x10b0);
    IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_09_GPIO3_IO09, 0x10b0);
    IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_10_GPIO3_IO10, 0x10b0);
    IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_11_GPIO3_IO11, 0x10b0);
    IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_01_GPIO3_IO01, 0x10b0);
    IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_02_GPIO3_IO02, 0x10b0);
    IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_03_GPIO3_IO03, 0x10b0);


    /* Reset sequence */
    HIGH(CS);
    LOW(SCK|SI);

    LOW(CS);
    HIGH(CS);
    HIGH(SI);

    LOW(CS);
    HIGH(CS);
    LOW(SI);

    LOW(CS);
    HIGH(CS);
    HIGH(SI);

    LOW(CS);
    HIGH(CS);

    /* Delay at least 110us */
    for (int i = 33000; i &amp;gt;= 0; i--) {
        __NOP();
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for the help&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 09:07:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Run-bootloader-from-application-rt1062/m-p/1292309#M14698</guid>
      <dc:creator>Robert123</dc:creator>
      <dc:date>2021-06-15T09:07:33Z</dc:date>
    </item>
  </channel>
</rss>

