<?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>topic Re: K60 Flash_LDD Causing hard fault in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Flash-LDD-Causing-hard-fault/m-p/231417#M5045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;K60F has a 8-byte write size while K60D or K60N has a 4-byte write size. To generate an 8-byte packed s-record, in the link file change ALIGN(4) to ALIGN(8). You may need to add some more . = &lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #0099ff; font-size: 10pt;"&gt;&lt;STRONG style="color: #0099ff; font-size: 10pt;"&gt;ALIGN&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;(8); &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Jun 2013 17:34:12 GMT</pubDate>
    <dc:creator>DerekLau</dc:creator>
    <dc:date>2013-06-21T17:34:12Z</dc:date>
    <item>
      <title>K60 Flash_LDD Causing hard fault</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Flash-LDD-Causing-hard-fault/m-p/231414#M5042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am creating a Bootloader for my K60FN1M.&lt;/P&gt;&lt;P&gt;I am using the Flash_LDD component in processor expert.&lt;/P&gt;&lt;P&gt;I read and parse a SRecord line, and then write it to Flash.&lt;/P&gt;&lt;P&gt;Occasionally, writing flash causes a Hard Fault. I think this is related to the write size of the Flash being 8 bytes, and sometimes the SRecord lines are not aligned to 8 bytes.&lt;/P&gt;&lt;P&gt;Since Flash can only be written once after an erase cycle, I think the driver is writing to some of the 8 bytes, and then on the next SRecord line, it writes to the additional bytes, causing a hard fault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an experience with this, or is there a good way to work around this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jun 2013 15:01:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Flash-LDD-Causing-hard-fault/m-p/231414#M5042</guid>
      <dc:creator>ETCTim</dc:creator>
      <dc:date>2013-06-20T15:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: K60 Flash_LDD Causing hard fault</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Flash-LDD-Causing-hard-fault/m-p/231415#M5043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The CW 10.4 has provided the Flash_LDD demo , and you may refer to it for details. It locates in "D:\CW MCU v10.4\MCU\CodeWarrior_Examples\Processor_Expert\Kinetis\TWR-K20D72M\FLASH", it is for K20D72M, but should be useful for &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;K60FN1M&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jun 2013 06:08:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Flash-LDD-Causing-hard-fault/m-p/231415#M5043</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2013-06-21T06:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: K60 Flash_LDD Causing hard fault</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Flash-LDD-Causing-hard-fault/m-p/231416#M5044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan,&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;Turns out the K20 has a 4 byte flash write size, which is perfect since it is a 32 bit processor.&lt;/P&gt;&lt;P&gt;The K60 for some reason has a 8 byte flash write size which makes it more difficult.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jun 2013 11:34:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Flash-LDD-Causing-hard-fault/m-p/231416#M5044</guid>
      <dc:creator>ETCTim</dc:creator>
      <dc:date>2013-06-21T11:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: K60 Flash_LDD Causing hard fault</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Flash-LDD-Causing-hard-fault/m-p/231417#M5045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;K60F has a 8-byte write size while K60D or K60N has a 4-byte write size. To generate an 8-byte packed s-record, in the link file change ALIGN(4) to ALIGN(8). You may need to add some more . = &lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #0099ff; font-size: 10pt;"&gt;&lt;STRONG style="color: #0099ff; font-size: 10pt;"&gt;ALIGN&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;(8); &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jun 2013 17:34:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Flash-LDD-Causing-hard-fault/m-p/231417#M5045</guid>
      <dc:creator>DerekLau</dc:creator>
      <dc:date>2013-06-21T17:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: K60 Flash_LDD Causing hard fault</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Flash-LDD-Causing-hard-fault/m-p/231418#M5046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Derek,&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;Is there anyway to make the linker create a SRecord with the length of data aligned to 8 bytes? I can adjust the max length, but that doesn't guarantee a data length with a multiple of 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance, the default 80 max SRecord length produces data of length 76, not a muliple of 8.&lt;/P&gt;&lt;P&gt;If I change it to 84, I get data of length 80. So, for the most part, it works out, but it doesn't guarantee that a shortened line won't screw things up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jun 2013 18:48:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Flash-LDD-Causing-hard-fault/m-p/231418#M5046</guid>
      <dc:creator>ETCTim</dc:creator>
      <dc:date>2013-06-21T18:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: K60 Flash_LDD Causing hard fault</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Flash-LDD-Causing-hard-fault/m-p/231419#M5047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey tim,&lt;/P&gt;&lt;P&gt;why do you read only 1 line of the srecord file ..&lt;/P&gt;&lt;P&gt;just read 2 or multiple lines .. so you have every time 8 bytes to flash ..&lt;/P&gt;&lt;P&gt;only at the last line you have to "fill up" the data with 0xff .. ?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can also flash a full sector .. 2048 bytes .. so collect every time 2048 bytes and flash them .. !?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it would even speed it up .. :smileyhappy:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 06:27:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Flash-LDD-Causing-hard-fault/m-p/231419#M5047</guid>
      <dc:creator>monXii</dc:creator>
      <dc:date>2013-06-25T06:27:55Z</dc:date>
    </item>
  </channel>
</rss>

