<?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>Kinetis Microcontrollers中的主题 Re: FRDM-K82F error when flashing large program to QSPI</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K82F-error-when-flashing-large-program-to-QSPI/m-p/466555#M28149</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jozefl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please be so kind to attach your images? (The one bigger than 30kB and the one that can be programmed correctly).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Isaac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jun 2016 17:19:04 GMT</pubDate>
    <dc:creator>isaacavila</dc:creator>
    <dc:date>2016-06-08T17:19:04Z</dc:date>
    <item>
      <title>FRDM-K82F error when flashing large program to QSPI</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K82F-error-when-flashing-large-program-to-QSPI/m-p/466554#M28148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have a program which is 42880 bytes large when built at Os in KDS3, however when I try to flash it to QSPI using blhost from the K80 bootloader tools, I get the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Boot Section 0x00000000:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; ERAS | adr=0x00000000 | cnt=0x00000800 | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; LOAD | adr=0x20000000 | len=0x00000200 | crc=0x0719eed2 | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; ENA&amp;nbsp; | adr=0x20000000 | cnt=0x00000004 | flg=0x0100&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; ERAS | adr=0x68000000 | cnt=0x00008000 | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; LOAD | adr=0x68000000 | len=0x00000200 | crc=0x0719eed2 | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; LOAD | adr=0x00000000 | len=0x000003c0 | crc=0xe83ccd71 | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; LOAD | adr=0x00000400 | len=0x00000010 | crc=0x0e6bd07a | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; LOAD | adr=0x68001000 | len=0x00009e88 | crc=0x5aad77e1 | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Inject command 'receive-sb-file'&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Preparing to send 42880 (0xa780) bytes to the target.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Successful generic response to command 'receive-sb-file'&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;usb hid detected receiver data abort&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;Data phase write aborted by status 0x2712 kStatus_AbortDataPhase&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;Response status = 403 (0x193) QSPI Flash Command Failure.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;Wrote 31200 of 42880 bytes.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a different program which is 25952 bytes when built at Os and flashing it using blhost completes successfully and the program runs correctly.&lt;/P&gt;&lt;P&gt;If I build that same program at -O0 then the program is larger than 31200 bytes and I get the same error as before:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Boot Section 0x00000000:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; ERAS | adr=0x00000000 | cnt=0x00000800 | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; LOAD | adr=0x20000000 | len=0x00000200 | crc=0x0719eed2 | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; ENA&amp;nbsp; | adr=0x20000000 | cnt=0x00000004 | flg=0x0100&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; ERAS | adr=0x68000000 | cnt=0x00008000 | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; LOAD | adr=0x68000000 | len=0x00000200 | crc=0x0719eed2 | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; LOAD | adr=0x00000000 | len=0x000003c0 | crc=0xe812f756 | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; LOAD | adr=0x00000400 | len=0x00000010 | crc=0x0e6bd07a | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; LOAD | adr=0x68001000 | len=0x00007d84 | crc=0xb93b887a | flg=0x0000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Inject command 'receive-sb-file'&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Preparing to send 34432 (0x8680) bytes to the target.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Successful generic response to command 'receive-sb-file'&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;usb hid detected receiver data abort&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;Data phase write aborted by status 0x2712 kStatus_AbortDataPhase&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;Response status = 403 (0x193) QSPI Flash Command Failure.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;Wrote 31200 of 34432 bytes.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;Why am I getting this error and how can I fix it? As far as I'm aware the QSPI memory is much larger than 30kB, in the linker script ~1MB is allocated for the text section in QSPI and the web page for the FRDM-K82F says they are 4MB each.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 16:10:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K82F-error-when-flashing-large-program-to-QSPI/m-p/466554#M28148</guid>
      <dc:creator>jozefl</dc:creator>
      <dc:date>2016-05-31T16:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K82F error when flashing large program to QSPI</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K82F-error-when-flashing-large-program-to-QSPI/m-p/466555#M28149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jozefl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please be so kind to attach your images? (The one bigger than 30kB and the one that can be programmed correctly).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Isaac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 17:19:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K82F-error-when-flashing-large-program-to-QSPI/m-p/466555#M28149</guid>
      <dc:creator>isaacavila</dc:creator>
      <dc:date>2016-06-08T17:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K82F error when flashing large program to QSPI</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K82F-error-when-flashing-large-program-to-QSPI/m-p/466556#M28150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the&amp;nbsp;same problem on the &lt;EM&gt;TWR-KL82Z72M&lt;/EM&gt;, except that the "cut-off size" seems&amp;nbsp;to vary depending on the actual image. I attached my images to this post.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First,&amp;nbsp;&lt;EM&gt;hello_world_qspi_small.sb,&lt;/EM&gt; which is basically the demo application from the SDK, is working:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;hello_world_qspi&amp;gt; blhost -V -p COM5 receive-sb-file hello_world_qspi_small.sb
Ping responded in 1 attempt(s)
Framing protocol version = 0x50010200, options = 0x0
Inject command 'receive-sb-file'
Preparing to send 11776 (0x2e00) bytes to the target.
Successful generic response to command 'receive-sb-file'
(1/1)100% Completed!
Successful generic response to command 'receive-sb-file'
 - took 3.421 seconds
Response status = 0 (0x0) Success.
Wrote 11776 of 11776 bytes.&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Second,&amp;nbsp;&lt;EM&gt;hello_world_qspi_large.sb,&lt;/EM&gt; which is the same but&amp;nbsp;extended by a very large constant array, is not working:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;hello_world_qspi&amp;gt; blhost -V -p COM5 receive-sb-file hello_world_qspi_large.sb
Ping responded in 1 attempt(s)
Framing protocol version = 0x50010200, options = 0x0
Inject command 'receive-sb-file'
Preparing to send 44640 (0xae60) bytes to the target.
Successful generic response to command 'receive-sb-file'
(1/1)97%Data phase write aborted by status 0x2712 kStatus_AbortDataPhase
Possible JUMP or RESET command received.
 - took 11.676 seconds
Response status = 403 (0x193) QSPI Flash Command Failure.
Wrote 43648 of 44640 bytes.&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If I increase the size of the constant array,&amp;nbsp;more bytes will be transferred, before it gets aborted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am running &lt;EM&gt;blhost&lt;/EM&gt; from a Cygwin shell on a Windows host but I have the same issue with the &lt;EM&gt;KinetisFlashTool&lt;/EM&gt; (with less output) so I guess that shouldn't matter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 15:21:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K82F-error-when-flashing-large-program-to-QSPI/m-p/466556#M28150</guid>
      <dc:creator>konradgräfe</dc:creator>
      <dc:date>2016-10-27T15:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K82F error when flashing large program to QSPI</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K82F-error-when-flashing-large-program-to-QSPI/m-p/466557#M28151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my case the QSPI config block&amp;nbsp;delivered with the SDK was wrong: the QSPI flashes don't have 4MiB each but 8MiB:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;diff --git a/qspi_config_block_generator.c b/qspi_config_block_generator.c
index 7e7da1a..1169621 100644
--- a/qspi_config_block_generator.c
+++ b/qspi_config_block_generator.c
@@ -183,8 +183,8 @@ int main(void)
 const qspi_config_t qspi_config_block = {
 .tag = kQspiConfigTag,
 .version = {.version = kQspiVersionTag},
- .sflash_A1_size = 0x400000, // 4MB
- .sflash_B1_size = 0x400000, // 4MB
+ .sflash_A1_size = 0x800000, // 8MB
+ .sflash_B1_size = 0x800000, // 8MB
 .sclk_freq = kQspiSerialClockFreq_Mid, // Mid frequency
 .sflash_type = kQspiFlashPad_Quad, // SPI Flash devices work under quad-pad mode
 .sflash_port = kQspiPort_EnableBothPorts, // Both QSPI0A and QSPI0B are enabled.‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My images are far away from those&amp;nbsp;4MiB, but with this&amp;nbsp;change it is indeed working for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2017 14:34:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K82F-error-when-flashing-large-program-to-QSPI/m-p/466557#M28151</guid>
      <dc:creator>konradgräfe</dc:creator>
      <dc:date>2017-09-07T14:34:16Z</dc:date>
    </item>
  </channel>
</rss>

