<?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: K22 flash section erasing problem</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675981#M41571</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Soeren Birth,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; What do you mean: &lt;STRONG&gt;It's just the ?%&amp;amp;.§$ debugger that do not.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Do you mean the KDS memory display is not correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&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>Mon, 15 May 2017 08:02:10 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2017-05-15T08:02:10Z</dc:date>
    <item>
      <title>K22 flash section erasing problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675978#M41568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have problems to erase a flash section. I'm using MK22FN512VLH12.&lt;/P&gt;&lt;P&gt;i'm using the C90TFS Driver. The erase command is set correct in the FCCOB-registers and the flash machine responses no errors. But the flash section isn't erased. It's untouched.&lt;/P&gt;&lt;P&gt;-&amp;gt; &lt;SPAN class=""&gt;MemoryAndFTFA-Registers.PNG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The flash command sequence is copied to ram and is performed.It's the same disassembly like the "FlashCommandSequence" - function&lt;/P&gt;&lt;P&gt;-&amp;gt; &lt;SPAN class=""&gt;FunctionInRam.PNG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; &lt;SPAN class=""&gt;RamDissassembly.PNG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If i put a wrong section address in the FCCOB-register it responses with an ACCERR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code seems to work if i erase/write section in the other block ( address &amp;gt; 0x3FFFF).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't share the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 09:35:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675978#M41568</guid>
      <dc:creator>soerenbirth</dc:creator>
      <dc:date>2017-05-11T09:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: K22 flash section erasing problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675979#M41569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Soeren Birth,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please try our KSDK2.2_FRDM-K22F120M flash code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; You can download the KSDK2.2 code from this link:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuxpresso.nxp.com/en/welcome" title="https://mcuxpresso.nxp.com/en/welcome"&gt;Welcome to MCUXpresso | MCUXpresso Config Tools&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Click SDK builder, choose board as FRDM-K22F, this board's chip is MK22FN512VLH12, after generate the code, and download it, you can find the flash code in folder:&lt;/P&gt;&lt;P&gt;SDK_2.2_FRDM-K22F\boards\frdmk22f\driver_examples\flash\pflash\iar&lt;/P&gt;&lt;P&gt;&amp;nbsp;I changed the erase flash sector address below 0x3FFFF, take an example:0x3f800, I can do the flash sector erase, program, erase again succesflly.&lt;/P&gt;&lt;P&gt;&amp;nbsp; So, please try this code.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Modify the pflash.c line destAdrss to 0X3F800, like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_207.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/18002iECFE0737BE96FF6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_207.png" alt="pastedImage_207.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After program the 0X3F800, the according address will have data:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_208.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/18102iE679E2F79D12F62D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_208.png" alt="pastedImage_208.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Do the flash sector erase again&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_209.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/18197i1086FAF7F1282205/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_209.png" alt="pastedImage_209.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can find the sector in address 0x3f800 is erased again.&lt;/P&gt;&lt;P&gt;When you run the code in the flash, please make sure your erased sector is not in the code sector, otherwise it may damaged your application code, you can check the code size whether it is in your erased flash sector.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&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>Mon, 15 May 2017 02:22:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675979#M41569</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-05-15T02:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: K22 flash section erasing problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675980#M41570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Kerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got it. The code works!!!! It's just the ?%&amp;amp;.§$ debugger that do not. I read the code with the J-Flash tool and there is a clean section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please fix the debugger problems, its really annoying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Sören&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2017 07:55:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675980#M41570</guid>
      <dc:creator>soerenbirth</dc:creator>
      <dc:date>2017-05-15T07:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: K22 flash section erasing problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675981#M41571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Soeren Birth,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; What do you mean: &lt;STRONG&gt;It's just the ?%&amp;amp;.§$ debugger that do not.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Do you mean the KDS memory display is not correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&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>Mon, 15 May 2017 08:02:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675981#M41571</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-05-15T08:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: K22 flash section erasing problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675982#M41572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is exactly what i mean. As you can see in my screenshots the memory browser keeps it values, even when i refresh it or when i reenter the address (0x2800 in this case).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Sören&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2017 08:06:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675982#M41572</guid>
      <dc:creator>soerenbirth</dc:creator>
      <dc:date>2017-05-15T08:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: K22 flash section erasing problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675983#M41573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Soeren Birth,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; It should be caused by the KDS bug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; In my memory, this problem should already be report.&lt;/P&gt;&lt;P&gt;&amp;nbsp; So, normally, if you find the data is not the data what you want in the IDE memory, you also can use the variable to read the according flash address, then you just need to read the variable, or printf it out, this is also the way what I like to check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kerry&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>Mon, 15 May 2017 08:11:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675983#M41573</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-05-15T08:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: K22 flash section erasing problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675984#M41574</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;Always maintain a healthy mistrust of the debugging tools since believing everything yo see can result n loss of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some debuggers also need the memory view refreshing to be sure that they keep in sync. with Flash content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the interface used in the uTasker project which ensures no such confusions can occur and testing/verification can be done at any time without a debugger:&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPe9A8qsefzQ%26t%3D28s" rel="nofollow" target="_blank"&gt;https://www.youtube.com/watch?v=Pe9A8qsefzQ&amp;amp;t=28s&lt;/A&gt;&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>Mon, 15 May 2017 21:32:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675984#M41574</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-05-15T21:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: K22 flash section erasing problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675985#M41575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a similar issue on a KE18.&amp;nbsp; It was not the debugger at all, but it was because the region of flash I was erasing was cached.&amp;nbsp; I had to clear the cache after erasing to force it to refresh.&amp;nbsp; You might have to refer to the cache controls for the K22 to see how to do that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 15:10:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-flash-section-erasing-problem/m-p/675985#M41575</guid>
      <dc:creator>davidsherman</dc:creator>
      <dc:date>2017-05-16T15:10:22Z</dc:date>
    </item>
  </channel>
</rss>

