<?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: PEx IntFlashLdd1_Write with byte-wide values is overwriting adjacent bytes.</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400181#M22189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Erich,&lt;/P&gt;&lt;P&gt;Thank you for having a look.&amp;nbsp; I really appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jun 2015 18:03:59 GMT</pubDate>
    <dc:creator>mstroven</dc:creator>
    <dc:date>2015-06-17T18:03:59Z</dc:date>
    <item>
      <title>PEx IntFlashLdd1_Write with byte-wide values is overwriting adjacent bytes.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400173#M22181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I ran into this issue over the weekend.&amp;nbsp; I am using the FRDM-KE06Z dev board with KDS 3.0.&lt;/P&gt;&lt;P&gt;I have dedicated (4)&amp;nbsp; 512-byte blocks of flash at Address 0x0000F800 for use as non-volatile data storage.&lt;/P&gt;&lt;P&gt;I am using the Processor-Expert-generated &lt;SPAN style="font-family: andale mono,times;"&gt;FLASH1_SetByteFlash( )&lt;/SPAN&gt; method to write 0s to a byte in my region.&lt;/P&gt;&lt;P&gt;The flash peripheral is setup using "write method" = "write" in PEx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I apologize in advance for the length of the posting, but I want to avoid all of the typical "back-and-forth" and put out all the details at once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Earlier code has already written the &lt;SPAN style="color: #3a0699;"&gt;0xfffffffd&lt;/SPAN&gt; value at 0x0000F810 using the &lt;SPAN style="font-family: andale mono,times; color: #eb7a3d;"&gt;FLASH1_SetLongFlash &lt;SPAN style="color: #303030;"&gt;method - which is working fine.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;0x0000F800&amp;nbsp; FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF &lt;SPAN style="color: #3a0699;"&gt;FFFFFFFD&lt;/SPAN&gt; FFFFFFFF FFFFFFFF FFFFFFFF&amp;nbsp; ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am careful to only change ones to zeros.&lt;/P&gt;&lt;P&gt;As I step through the following code in the debugger, I see Bytes being modified at 0x0000F801, 0x0000F802, and 0x0000F803 as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;FLASH1&lt;/SPAN&gt;_SetByteFlash(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0xFE );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;verylongdelay();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;At this point in the Memory Browser view, I see what I expect:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;(Displaying in Little Endian format)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;0x0000F800&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;FFFFFFFE&lt;/SPAN&gt; FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFD FFFFFFFF FFFFFFFF FFFFFFFF&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;þÿÿÿ&lt;/SPAN&gt;ÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But watch after this is executed...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;FLASH1&lt;/SPAN&gt;_SetByteFlash(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0xFC );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;verylongdelay();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now things have gotten weird:&lt;/P&gt;&lt;P&gt;0x0000F800&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;FFFFFEFC&lt;/SPAN&gt; FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFD FFFFFFFF FFFFFFFF FFFFFFFF&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;üþÿÿ&lt;/SPAN&gt;ÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new value is in the correct location, but the previously-written byte has moved up!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;FLASH1&lt;/SPAN&gt;_&lt;SPAN style="font-family: andale mono,times;"&gt;SetByteFlash&lt;/SPAN&gt;(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0xF8 );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;verylongdelay();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0x0000F800&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;FFFEFCF8&lt;/SPAN&gt; FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFD FFFFFFFF FFFFFFFF FFFFFFFF&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;øüþÿ&lt;/SPAN&gt;ÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now again, the new write is correct, but the side effects are very annoying:&lt;/P&gt;&lt;P&gt;The two previously-written bytes have been flashed at the two addresses above my target writeaddress:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And so it continues with this write:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;FLASH1&lt;/SPAN&gt;_&lt;SPAN style="font-family: andale mono,times;"&gt;SetByteFlash&lt;/SPAN&gt;(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0xF0 );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;verylongdelay();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0x0000F800&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;FEFCF8F0&lt;/SPAN&gt; FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFD FFFFFFFF FFFFFFFF FFFFFFFF&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;ðøüþ&lt;/SPAN&gt;ÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again.&amp;nbsp; Preview bytes are overwritten in higher-order bytes of the longword.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now things change when we write again the 5th time.&lt;/P&gt;&lt;P&gt;We never go out of this specific long, but we do put the correct data at the correct target address:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;FLASH1&lt;/SPAN&gt;_&lt;SPAN style="font-family: andale mono,times;"&gt;SetByteFlash&lt;/SPAN&gt;(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0xE0 );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;verylongdelay();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0x0000F800&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;FCF8F0E0&lt;/SPAN&gt; FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFD FFFFFFFF FFFFFFFF FFFFFFFF&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;àðøü&lt;/SPAN&gt;ÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that no other bytes are affected when writing the 5th time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, as before, the three additional writes seem to adversely affect the other bytes in the longword:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;FLASH1&lt;/SPAN&gt;_&lt;SPAN style="font-family: andale mono,times;"&gt;SetByteFlash&lt;/SPAN&gt;(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0xC0 );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;verylongdelay();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0x0000F800&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;F8F0E0C0&lt;/SPAN&gt; FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFD FFFFFFFF FFFFFFFF FFFFFFFF&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;Àðøü&lt;/SPAN&gt;ÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;FLASH1&lt;/SPAN&gt;_SetByteFlash(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0x80 );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;verylongdelay();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0x0000F800&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;F0E0C080&lt;/SPAN&gt; FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFD FFFFFFFF FFFFFFFF FFFFFFFF&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;.Àðø&lt;/SPAN&gt;ÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;FLASH1_SetByteFlash(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0x00 );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;verylongdelay();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0x0000F800&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;E0C08000&lt;/SPAN&gt; FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFD FFFFFFFF FFFFFFFF FFFFFFFF&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;..Àà&lt;/SPAN&gt;ÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously, at this point we have zeroed all 8 bits at location 0x0000F800, so the experiment has to end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone else please verify this operation?&amp;nbsp; I am not sure whether this is a bug in the Processor Expert-generated code, or an issue with the Flash peripheral in the KE06Z part?&lt;/P&gt;&lt;P&gt;In order to keep moving forward with my project, I have replaced all &lt;SPAN style="font-family: andale mono,times;"&gt;&lt;SPAN style="color: #e23d39;"&gt;FLASH1_SetByteFlash()&lt;/SPAN&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; calls with &lt;SPAN style="color: #eb7a3d; font-family: andale mono,times;"&gt;FLASH1_SetLongFlash()&lt;/SPAN&gt;, and re-architected as necessary to use longwords instead of bytes.&amp;nbsp; Hopefully I can save others some hassle in the future...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;-Mike&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 15:25:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400173#M22181</guid>
      <dc:creator>mstroven</dc:creator>
      <dc:date>2015-06-15T15:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: PEx IntFlashLdd1_Write with byte-wide values is overwriting adjacent bytes.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400174#M22182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Mike,&lt;/P&gt;&lt;P&gt;To investigate your problem correctly and efficiently, please provide your demo project, I will check it directly on my side.&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Zhang Jun&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, 17 Jun 2015 04:14:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400174#M22182</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2015-06-17T04:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: PEx IntFlashLdd1_Write with byte-wide values is overwriting adjacent bytes.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400175#M22183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot modify a long word once any bits in it have been set to 0.&lt;/P&gt;&lt;P&gt;This is a standard characteristic of the Flash used in all Kinetis parts (although some can't modify within an 8 bit phrase) and is clearly indiated in all user manuals:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31299i39B93D1BE12052EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The effect that you are seeing is probably due to EEC operation (although I don't know for sure since there is no documentation on the internal workings) whereby each write entity is saved with an EEC value (not visible but also in flash) when it is programmed which can correct an error (allowing smaller flash structures with lower reliability but offset by error correction). When the long word is changed it is no longer possible to change the EEC that was saved the first time and now when the Flash entity is read the EEC tries to correct bit(s) that no longer match and so you read back wierd values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;When the same incorrect utilisation of Flash takes place on some of the larger devices (like K70) the effect is that the read back phase causes a hardware access error (rather than just strange values) which is only corrected when an erase of the sFlash sector is performed.&lt;/EM&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;P&gt;&lt;/P&gt;&lt;P&gt;Kinetis: &lt;A href="http://www.utasker.com/kinetis.html" title="http://www.utasker.com/kinetis.html"&gt;µTasker Kinetis support&lt;/A&gt; &lt;/P&gt;&lt;P&gt;KE: &lt;A href="http://www.utasker.com/kinetis/FRDM-KE02Z.html" title="http://www.utasker.com/kinetis/FRDM-KE02Z.html"&gt;µTasker FRDM-KE02Z support&lt;/A&gt;&amp;nbsp; / &lt;A href="http://www.utasker.com/kinetis/FRDM-KE02Z40M.html" title="http://www.utasker.com/kinetis/FRDM-KE02Z40M.html"&gt;µTasker FRDM-KE02Z40M support&lt;/A&gt;&amp;nbsp; / &lt;A href="http://www.utasker.com/kinetis/FRDM-KE06Z.html" title="http://www.utasker.com/kinetis/FRDM-KE06Z.html"&gt;µTasker FRDM-KE06Z support&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;EM&gt;For the complete "out-of-the-box" Kinetis experience and faster time to market&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 12:53:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400175#M22183</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2015-06-17T12:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: PEx IntFlashLdd1_Write with byte-wide values is overwriting adjacent bytes.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400176#M22184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Mark,&lt;/P&gt;&lt;P&gt;This makes some sense to me.&amp;nbsp; It would indeed be very helpful to know what Freescale have actually implemented in the low-level Flash Controller...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That said, I was under the impression from the Processor Expert config help that the &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"write method" = "write", would disable this type of error checking.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Here is the help info that comes up:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2015-06-17 at 11.12.17 AM.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/35931i5F58B8296DA492A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2015-06-17 at 11.12.17 AM.png" alt="Screen Shot 2015-06-17 at 11.12.17 AM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Apparently there is more going on below than I first assumed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;It is curious that the 32-bit long-writes are working exactly as I assumed the byte-writes would have.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If there are any freescale engineers on the board who can point me (us) to a more in-depth description of the flash controller implementation, I would greatly appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Thanks again Mark!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 15:16:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400176#M22184</guid>
      <dc:creator>mstroven</dc:creator>
      <dc:date>2015-06-17T15:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: PEx IntFlashLdd1_Write with byte-wide values is overwriting adjacent bytes.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400177#M22185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Zhang Jun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No project is necessary.&amp;nbsp; To verify, I started with a new Processor Export project on the FRDM-KE06Z dev board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PEx, instantiate the "IntFLASH" module and name it as FLASH1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;export and compile your code.&lt;/P&gt;&lt;P&gt;Then in main(), you can just single step through the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FLASH1_SetByteFlash(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0xFE );&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FLASH1_SetByteFlash(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0xFC );&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FLASH1_SetByteFlash(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0xF8 );&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FLASH1_SetByteFlash(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0xF0 );&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FLASH1_SetByteFlash(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0xE0 );&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FLASH1_SetByteFlash(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0xC0 );&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FLASH1_SetByteFlash(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0x80 );&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FLASH1_SetByteFlash(&amp;nbsp; (RecordStore_TAddress)0x0000F800, 0x00 );&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At each step, in the Eclipse Memory Browser view, you can see the results of the write.&lt;/P&gt;&lt;P&gt;(Displaying in Little Endian format)&lt;/P&gt;&lt;P&gt;0x0000F800&amp;nbsp; FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFD FFFFFFFF FFFFFFFF FFFFFFFF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that Mark Butcher has put me on the right track (see reply below), but it would be very helpful if someone from Freescale could point us to a more in-depth treatise on the Kinetis Internal Flash Controller...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 15:52:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400177#M22185</guid>
      <dc:creator>mstroven</dc:creator>
      <dc:date>2015-06-17T15:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: PEx IntFlashLdd1_Write with byte-wide values is overwriting adjacent bytes.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400178#M22186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is in fact no such thing as a byte write for the Kinetis.&lt;/P&gt;&lt;P&gt;A byte write in a SW interface will only be positioning the byte accordingly in the long word and writing the long word with the other bytes set to 0xff. It still can't physically write more than one byte in a long word of Flash (in the KE part).&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;P&gt;&lt;/P&gt;&lt;P&gt;Kinetis: &lt;A class="jive-link-external-small" data-content-finding="Community" href="http://www.utasker.com/kinetis.html" rel="nofollow" target="_blank"&gt;µTasker Kinetis support&lt;/A&gt; &lt;/P&gt;&lt;P&gt;KE: &lt;A class="jive-link-external-small" data-content-finding="Community" href="http://www.utasker.com/kinetis/FRDM-KE02Z.html" rel="nofollow" target="_blank"&gt;µTasker FRDM-KE02Z support&lt;/A&gt;&amp;nbsp; / &lt;A class="jive-link-external-small" data-content-finding="Community" href="http://www.utasker.com/kinetis/FRDM-KE02Z40M.html" rel="nofollow" target="_blank"&gt;µTasker FRDM-KE02Z40M support&lt;/A&gt;&amp;nbsp; / &lt;A class="jive-link-external-small" data-content-finding="Community" href="http://www.utasker.com/kinetis/FRDM-KE06Z.html" rel="nofollow" target="_blank"&gt;µTasker FRDM-KE06Z support&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;EM&gt;For the complete "out-of-the-box" Kinetis experience and faster time to market&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 16:24:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400178#M22186</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2015-06-17T16:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: PEx IntFlashLdd1_Write with byte-wide values is overwriting adjacent bytes.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400179#M22187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It this is the case, then the PEx library code implementing the FLASH1_SetByteFlash() is faulty.&amp;nbsp; Since using the same scenario with FLASH1_SetLongFlash() seems to work exactly as expected....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 17:00:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400179#M22187</guid>
      <dc:creator>mstroven</dc:creator>
      <dc:date>2015-06-17T17:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: PEx IntFlashLdd1_Write with byte-wide values is overwriting adjacent bytes.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400180#M22188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;from what is described here, this looks like a Processor Expert bug in the IntFlash component. I will file a ticket about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 17:46:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400180#M22188</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-06-17T17:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: PEx IntFlashLdd1_Write with byte-wide values is overwriting adjacent bytes.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400181#M22189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Erich,&lt;/P&gt;&lt;P&gt;Thank you for having a look.&amp;nbsp; I really appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 18:03:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PEx-IntFlashLdd1-Write-with-byte-wide-values-is-overwriting/m-p/400181#M22189</guid>
      <dc:creator>mstroven</dc:creator>
      <dc:date>2015-06-17T18:03:59Z</dc:date>
    </item>
  </channel>
</rss>

