<?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: IMXRT1064 Flashloader Erase and Program Flash in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMXRT1064-Flashloader-Erase-and-Program-Flash/m-p/1368691#M182809</link>
    <description>&lt;P&gt;Kerry,&lt;/P&gt;&lt;P&gt;Thank you so much. Your message provided enough information to get it working.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Nov 2021 16:28:15 GMT</pubDate>
    <dc:creator>nmeltzer</dc:creator>
    <dc:date>2021-11-09T16:28:15Z</dc:date>
    <item>
      <title>IMXRT1064 Flashloader Erase and Program Flash</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMXRT1064-Flashloader-Erase-and-Program-Flash/m-p/1364638#M182433</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Apologies if this is a duplicate but as far as I could find, nobody has posted specifically about the question I am going to ask. I'll first describe what I am trying to do, then what I have working, and then where things are breaking down.&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;My Goal:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I have an IMXRT1064 chip acting as a coprocessor to an embedded linux system. There is a desire to use the nxp-provided flashloader/bootloader in order to perform software updates of the IMX chip instead of writing a custom bootloader.&lt;/P&gt;&lt;P&gt;Because tools like sdphost and mcubootutility are windows-programs, I am implementing command line tools for the embedded linux environment that will provide some of the same functionality as the windows-based tools.&lt;/P&gt;&lt;P&gt;The flash that I am trying to write my application to is the "internal" flash that comes on-board the IMXRT1064 chip.&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;What I have Working:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Using the IMXRT Rom API, I can load the flashloader into RAM and then I can jump to it. After that, I am able to ping the flashloader and get expected responses. I can also use the &lt;FONT face="courier new,courier"&gt;FillMemory&amp;nbsp;&lt;/FONT&gt;command to fill a given address in RAM with a 32-bit pattern. I verified this by viewing the memory if the RT in a debugger.&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;Where things are breaking down:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Per both the imxrt and the flashloader reference manuals, I need to configure the flash config block so that the flashloader can talk to the target flash (which makes sense).&lt;/P&gt;&lt;P&gt;In The MCU Flashloader Reference Manual, section 6.2.2.1, the QuadSPI NOR configuration option block is &lt;FONT face="courier new,courier"&gt;0xC0000006(100MHz)&lt;/FONT&gt; and in the IMXRT1064 Processor Reference Manual, the configuration block is &lt;FONT face="courier new,courier"&gt;0xC0000008(133MHz).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Thus, I use the &lt;FONT face="courier new,courier"&gt;FillMemory&lt;/FONT&gt; command to fill an address in the DTCM range of RAM (&lt;FONT face="courier new,courier"&gt;0x20000000&lt;/FONT&gt; range) with a single iteration of the pattern&amp;nbsp;&lt;FONT face="courier new,courier"&gt;0xC0000008(133MHz).&amp;nbsp;&lt;FONT face="arial,helvetica,sans-serif"&gt;I get an ACK and appropriate generic response back from the flashloader.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I then make a call to the &lt;FONT face="courier new,courier"&gt;ConfigureMemory&lt;/FONT&gt; flashloader api command, and pass it the 2-parameter message that it expects. The first parameter is the &lt;FONT face="courier new,courier"&gt;SerialNorQuadSPI&lt;/FONT&gt; identifier and the second is the address of the flash config word from above. After sending this command, I do not get any response. No ACK, no generic response ... nothing. I can follow that up with 2 &lt;FONT face="courier new,courier"&gt;ping&lt;/FONT&gt; commands. The first of which will fail with no response, and the second of which will succeed.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;This makes me think that the configure memory command maybe expects more parameters than what the reference manual indicates? but that is just a guess.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Any help will be greatly appreciated! Thank you for your time.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Noah&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 16:32:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMXRT1064-Flashloader-Erase-and-Program-Flash/m-p/1364638#M182433</guid>
      <dc:creator>nmeltzer</dc:creator>
      <dc:date>2021-11-01T16:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: IMXRT1064 Flashloader Erase and Program Flash</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMXRT1064-Flashloader-Erase-and-Program-Flash/m-p/1364943#M182472</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/193035"&gt;@nmeltzer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Thanks a lot for your effort!&lt;/P&gt;
&lt;P&gt;&amp;nbsp; From your description, your flashloader already works, just the configure memory area has issues.&lt;/P&gt;
&lt;P&gt;This is my previous RT1064 blhost connect command, you can totally refer to it and test it again, whether your configure memory can work or not:&lt;/P&gt;
&lt;P&gt;elftosb.exe -f imx -V -c imx-flexspinor-normal-unsigned.bd -o ivt_evkmimxrt1064_iled_blinky.bin evkmimxrt1064_iled_blinky.s19&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sdphost.exe -t 50000 -p COM41,115200 -j -- write-file 0x20000000 rt1064_ivt_flashloader.bin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sdphost.exe -t 50000 -p COM41,115200 -j -- jump-address 0x20000400&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;blhost.exe -t 50000 -p COM41,115200 -j -- get-property 1 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;blhost.exe -t 50000 -p COM41,115200 -j -- get-property 24 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;blhost.exe -t 5242000 -p COM41,115200 -j -- fill-memory 0x20202000 4 0xc0000007 word&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;blhost.exe -t 5242000 -p COM41,115200 -j -- fill-memory 0x20202004 4 0 word&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;blhost.exe -t 50000 -p COM41,115200 -j -- configure-memory 9 0x20202000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;blhost -t 5242000 -p COM41,115200 -j -- read-memory 0x70000000 1024 flexspiNorCfg.dat 9&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;blhost -t 2048000 -p COM41,115200 -j -- flash-erase-region 0x70000000 0x6000 9&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;blhost -t 5242000 -p COM41,115200 -j -- fill-memory 0x20203000 4 0XF000000F word&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;blhost -t 50000 -p COM41,115200 -j -- configure-memory 9 0x20203000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;blhost -t 5242000 -p COM41,115200 -j -- read-memory 0x70000000 1024 flexspiNorCfg.dat 9&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;blhost -t 5242000 -p COM41,115200 -j -- write-memory 0x70001000 ivt_evkmimxrt1064_iled_blinky_nopadding.bin 9&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;blhost -t 5242000 -p COM41,115200 -j -- read-memory 0x70000000 0x6000 flexspiNorCfg.dat 9&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any updated information, just let me know.&lt;/P&gt;
&lt;P&gt;best Regards,&lt;/P&gt;
&lt;P&gt;kerry&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 08:15:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMXRT1064-Flashloader-Erase-and-Program-Flash/m-p/1364943#M182472</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2021-11-02T08:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: IMXRT1064 Flashloader Erase and Program Flash</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMXRT1064-Flashloader-Erase-and-Program-Flash/m-p/1368691#M182809</link>
      <description>&lt;P&gt;Kerry,&lt;/P&gt;&lt;P&gt;Thank you so much. Your message provided enough information to get it working.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 16:28:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMXRT1064-Flashloader-Erase-and-Program-Flash/m-p/1368691#M182809</guid>
      <dc:creator>nmeltzer</dc:creator>
      <dc:date>2021-11-09T16:28:15Z</dc:date>
    </item>
  </channel>
</rss>

