<?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中的主题 Flash command problems</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-command-problems/m-p/302320#M12724</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Forumers!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MCU:MKL25Z128VFM4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We're trying to create a bootloader app which is capable of self programming the flash.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We've tried executing the following command:&lt;/P&gt;&lt;P&gt;-erase flash sector&lt;/P&gt;&lt;P&gt;-program longword&lt;/P&gt;&lt;P&gt;-program check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is regarding to all of the command:&lt;/P&gt;&lt;P&gt;In some cases the mcu resets, and RCM state of LOCKUP is detected after reset. If the above mentioned routines are placed somewhere else in the code, this reset may not occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We cannot understand the reason of this, and at this point we've stuck continuing the firmware development.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help us, how should we modify our code, if it is possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above mentioned subroutines are running from program flash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Mar 2014 08:56:34 GMT</pubDate>
    <dc:creator>rothkarl</dc:creator>
    <dc:date>2014-03-24T08:56:34Z</dc:date>
    <item>
      <title>Flash command problems</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-command-problems/m-p/302320#M12724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Forumers!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MCU:MKL25Z128VFM4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We're trying to create a bootloader app which is capable of self programming the flash.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We've tried executing the following command:&lt;/P&gt;&lt;P&gt;-erase flash sector&lt;/P&gt;&lt;P&gt;-program longword&lt;/P&gt;&lt;P&gt;-program check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is regarding to all of the command:&lt;/P&gt;&lt;P&gt;In some cases the mcu resets, and RCM state of LOCKUP is detected after reset. If the above mentioned routines are placed somewhere else in the code, this reset may not occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We cannot understand the reason of this, and at this point we've stuck continuing the firmware development.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help us, how should we modify our code, if it is possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above mentioned subroutines are running from program flash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 08:56:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-command-problems/m-p/302320#M12724</guid>
      <dc:creator>rothkarl</dc:creator>
      <dc:date>2014-03-24T08:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Flash command problems</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-command-problems/m-p/302321#M12725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the problem here is MKL25Z128VFM4 only have one flash block (review &lt;STRONG&gt;3.6.1.1 Flash Memory Sizes&lt;/STRONG&gt; in the Reference manual for this part number &lt;A href="http://cache.freescale.com/files/32bit/doc/ref_manual/KL25P80M48SF0RM.pdf?fasp=1&amp;amp;WT_TYPE=Reference%20Manuals&amp;amp;WT_VENDOR=FREESCALE&amp;amp;WT_FILE_FORMAT=pdf&amp;amp;WT_ASSET=Documentation"&gt;&lt;STRONG&gt;KL25P80M48SF0RM&lt;/STRONG&gt;&lt;/A&gt;) you can only write flash from flash, if you write a block from different block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case I suggest you to try Execute flash commands from SRAM, please review &lt;A href="http://cache.freescale.com/files/32bit/doc/app_note/AN4695.pdf?&amp;amp;Parent_nodeId=&amp;amp;Parent_pageType="&gt;&lt;STRONG&gt;AN4695 Avoiding Read While Write Errors When Developing In-Software Flash Programming Applications for Kinetis and ColdFire+ MCUs&lt;/STRONG&gt;&lt;/A&gt;, check &lt;STRONG&gt;2.1.2 Method 2: Execute flash commands from SRAM &lt;/STRONG&gt;I hope you may find this useful&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a nice day :P,&lt;BR /&gt;Perla&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 21:21:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-command-problems/m-p/302321#M12725</guid>
      <dc:creator>perlam_i_au</dc:creator>
      <dc:date>2014-03-26T21:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Flash command problems</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-command-problems/m-p/302322#M12726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get boot loaders for the KL25 here: &lt;A _jive_internal="true" href="https://community.nxp.com/thread/317301" title="https://community.freescale.com/thread/317301"&gt;https://community.freescale.com/thread/317301&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise you ned to execute all Flash operatiosn form SRAm with interrupt disabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 22:24:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-command-problems/m-p/302322#M12726</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-03-26T22:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Flash command problems</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-command-problems/m-p/302323#M12727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the reply, I've mapped my flash command functions into SRAM, and it works fine, after I've disabled the interrupt!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 21:15:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-command-problems/m-p/302323#M12727</guid>
      <dc:creator>rothkarl</dc:creator>
      <dc:date>2014-03-27T21:15:30Z</dc:date>
    </item>
  </channel>
</rss>

