<?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: Erasing Flash sectors in KL25 on the Freedom Board.</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160706#M615</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not able to change the section "User memory areas", it's grey and will not let me make "Use user memory areas" to yes. I did step one, is there something else I'm missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jun 2013 18:57:51 GMT</pubDate>
    <dc:creator>lander</dc:creator>
    <dc:date>2013-06-19T18:57:51Z</dc:date>
    <item>
      <title>Erasing Flash sectors in KL25 on the Freedom Board.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160701#M610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Processor Expert has a Flash component which I used for the freedom board. I am able to successfully execute the Read Method. I can successfully execute the Write Method, but only once. If I try to write the 2nd time at the same memory location, it fails. It seems this is because the Write method does not Erase before writing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to execute the Erase and EraseBlock Method, but it did not work. It seems the "safe launch and wait" property of the Flash component prevented me from using the Erase Methods. Has anyone been able to use the Erase/EraseBlock Methods? If yes, can you please post some sample code, similar to sample code for Write and Read Methods examples given in the "Typical Usage" section of the Flash Component Help documentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 18:40:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160701#M610</guid>
      <dc:creator>embeddedcontrac</dc:creator>
      <dc:date>2012-10-31T18:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Erasing Flash sectors in KL25 on the Freedom Board.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160702#M611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, you have to reserve some Flash pages for data storage. Do that in the CPU Build Options, Reduce the Flash for code, for example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/118952iB801D0676E2804EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.bmp" alt="1.bmp" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, configure those pages to be used by Flash component:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/118953i3A5759F9FEE795F8/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.bmp" alt="2.bmp" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, enable the Flash methods you need:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/118954i16A74962D397A631/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.bmp" alt="3.bmp" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, you can save the data in the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read:&lt;/P&gt;&lt;P&gt; FLASH1_Read(FLASH1Pointer,0x1F000, &amp;amp;savedData.red, sizeof(savedData));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLASH1_Main(FLASH1Pointer);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OpStatus = FLASH1_GetOperationStatus(FLASH1Pointer);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; } while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erase one page, in case is not 0xFF the locations to write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FLASH1_Erase(FLASH1Pointer, 0x1F000, 1024);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLASH1_Main(FLASH1Pointer);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OpStatus = FLASH1_GetOperationStatus(FLASH1Pointer);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then write the data in Flash:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FLASH1_Write(FLASH1Pointer, FromPtr, 0x1F000, Size);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLASH1_Main(FLASH1Pointer);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OpStatus = FLASH1_GetOperationStatus(FLASH1Pointer);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 23:16:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160702#M611</guid>
      <dc:creator>LuisCasado</dc:creator>
      <dc:date>2012-10-31T23:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Erasing Flash sectors in KL25 on the Freedom Board.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160703#M612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How did you write the flash with longword? I am trying to write. buy I am confused about FCCOB 1:3 registers Flash address.&amp;nbsp; I know the flash address ranges from 0x0000_0000 - 0x07FF_FFFF. which is 128K byte. how come FCCOB 1-3 registers only specify flash adress from 0 - 23 bits? supposed to be 0 -26 bits, right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2012 13:51:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160703#M612</guid>
      <dc:creator>pengliang</dc:creator>
      <dc:date>2012-11-13T13:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Erasing Flash sectors in KL25 on the Freedom Board.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160704#M613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured out~&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2012 15:25:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160704#M613</guid>
      <dc:creator>pengliang</dc:creator>
      <dc:date>2012-11-13T15:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Erasing Flash sectors in KL25 on the Freedom Board.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160705#M614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I implemented your code and it worked fine, but using the same code under FreeRtos, after erase operation I got the message :&lt;/P&gt;&lt;P&gt;No source available for "0xFFFFFFFE (0xFFFFFFFE)() " &lt;/P&gt;&lt;P&gt;I also tried disable interruptions during this operation but it didn't worked fine.&lt;/P&gt;&lt;P&gt;Do You have any suggestion ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 20:04:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160705#M614</guid>
      <dc:creator>HeronBR</dc:creator>
      <dc:date>2013-02-28T20:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Erasing Flash sectors in KL25 on the Freedom Board.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160706#M615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not able to change the section "User memory areas", it's grey and will not let me make "Use user memory areas" to yes. I did step one, is there something else I'm missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jun 2013 18:57:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160706#M615</guid>
      <dc:creator>lander</dc:creator>
      <dc:date>2013-06-19T18:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Erasing Flash sectors in KL25 on the Freedom Board.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160707#M616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found that you must erase a block size equivalent to the minimum block size of the processor. Trying to erase a smaller amount gives an error. This sounds sensible, though the comment in the PE definition of FLASH1_Erase() is not clear about this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// don't try to erase 64 bytes!&lt;/P&gt;&lt;P&gt;//OpStatus = FLASH1_Erase(FLASH1Pointer, 0x1F000, sizeof(savedData));&lt;/P&gt;&lt;P&gt;OpStatus = FLASH1_Erase(FLASH1Pointer, 0x1F000, FLASH1_ERASABLE_UNIT_SIZE);&lt;/P&gt;&lt;P&gt;if (OpStatus != ERR_OK){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Erase error. Status code is: %02x\n", OpStatus);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 17:10:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160707#M616</guid>
      <dc:creator>charlespalmer</dc:creator>
      <dc:date>2013-06-27T17:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Erasing Flash sectors in KL25 on the Freedom Board.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160708#M617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there, i want to store some data to the flash, but i don't know how to do it, i use cw 10.5 and set up of user memory areas is grey, and it doesn't have the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FLASH1_GetOperationStatus function.and what should I send to the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FLASH1Pointer&lt;/SPAN&gt; parameter?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 May 2014 15:28:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Erasing-Flash-sectors-in-KL25-on-the-Freedom-Board/m-p/160708#M617</guid>
      <dc:creator>亚男张</dc:creator>
      <dc:date>2014-05-18T15:28:01Z</dc:date>
    </item>
  </channel>
</rss>

