<?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: FLASH_LDD issue with safe write and FTFE in Processor Expert Software</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/FLASH-LDD-issue-with-safe-write-and-FTFE/m-p/231510#M1208</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;thanks for reporting this issue. Do you need the hot-fix for it or it is sufficient for you to disable code generattion of this component and fix it manualy?&lt;/P&gt;&lt;P&gt;Anyway the fix will be published within CW V10.6 in Q1/2014 - Q2/2014&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let us know your decission. We are sorry for inconvenience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Vojtech Filip&lt;/P&gt;&lt;P&gt;Processor Expert Support Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Sep 2013 07:42:49 GMT</pubDate>
    <dc:creator>vfilip</dc:creator>
    <dc:date>2013-09-16T07:42:49Z</dc:date>
    <item>
      <title>FLASH_LDD issue with safe write and FTFE</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/FLASH-LDD-issue-with-safe-write-and-FTFE/m-p/231509#M1207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a project that was running on a K20DX256 that stores some parameters in flash using the IntFLASH and FLASH_LDD components. The project is transitioning to a K20FX512 in order have more ram available when. When I did this I started to receive hard faults when writing to flash. The hard faults would always occur at the the same address, but I was able to complete several other flash writes successfully before getting the fault. To further complicated the issue, once I'd received the hard fault during the write subsequent reads of the same memory would also generate a hard fault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Digging into it it looks like there is a bug in the IntFlashLdd2_CommandCompleteInterrupt function generated by FLASH_LDD. This code has logic to allow writes of less than the 8 bytes by reading the values that are currently in flash and merging it with the data to be written. However, if the data being written lines up such that it's only in part of the top 4 bytes then the data that is read back is not properly merged resulting in the hard fault. The code snipet below shows the fix that worked for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FlashPrgUnitAddr = DeviceDataPrv-&amp;gt;CurrentFlashAddress - DstAddrOffset;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CurrentFlashPrgUnitData[0] = ((uint32_t *)FlashPrgUnitAddr)[0];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CurrentFlashPrgUnitData[1] = ((uint32_t *)FlashPrgUnitAddr)[1];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(((DataToPrg[0] &amp;amp; DataToPrgMask[0]) &amp;amp; (~CurrentFlashPrgUnitData[0])) &amp;gt; 0U) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DeviceDataPrv-&amp;gt;CurrentErrorFlags |= LDD_FLASH_MULTIPLE_WRITE_ERROR;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/P&gt;&lt;P&gt;&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; if(((DataToPrg[1] &amp;amp; DataToPrgMask[1]) &amp;amp; (~CurrentFlashPrgUnitData[1])) &amp;gt; 0U) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DeviceDataPrv-&amp;gt;CurrentErrorFlags |= LDD_FLASH_MULTIPLE_WRITE_ERROR;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/P&gt;&lt;P&gt;&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; DataToPrg[0] = DataToPrg[0] ^ (~CurrentFlashPrgUnitData[0]);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataToPrg[1] = DataToPrg[1] ^ (~CurrentFlashPrgUnitData[1]);&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;lt;&amp;lt;---- This line was missing!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DeviceDataPrv-&amp;gt;CurrentDataSize = PrgBytesCount;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DeviceDataPrv-&amp;gt;DataCounter -= PrgBytesCount;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTFE_PDD_WriteFCCOBFirstLongWordData(FTFE_BASE_PTR, DataToPrg[0]);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTFE_PDD_WriteFCCOBSecondLongWordData(FTFE_BASE_PTR, DataToPrg[1]);&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2013 19:51:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/FLASH-LDD-issue-with-safe-write-and-FTFE/m-p/231509#M1207</guid>
      <dc:creator>davidschroeder</dc:creator>
      <dc:date>2013-09-13T19:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH_LDD issue with safe write and FTFE</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/FLASH-LDD-issue-with-safe-write-and-FTFE/m-p/231510#M1208</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;thanks for reporting this issue. Do you need the hot-fix for it or it is sufficient for you to disable code generattion of this component and fix it manualy?&lt;/P&gt;&lt;P&gt;Anyway the fix will be published within CW V10.6 in Q1/2014 - Q2/2014&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let us know your decission. We are sorry for inconvenience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Vojtech Filip&lt;/P&gt;&lt;P&gt;Processor Expert Support Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 07:42:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/FLASH-LDD-issue-with-safe-write-and-FTFE/m-p/231510#M1208</guid>
      <dc:creator>vfilip</dc:creator>
      <dc:date>2013-09-16T07:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH_LDD issue with safe write and FTFE</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/FLASH-LDD-issue-with-safe-write-and-FTFE/m-p/231511#M1209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;Vojtech,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I can get by with disabling code generation and manually fixing the problem for the time being. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;&amp;nbsp;&amp;nbsp; ~Dave&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 13:58:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/FLASH-LDD-issue-with-safe-write-and-FTFE/m-p/231511#M1209</guid>
      <dc:creator>davidschroeder</dc:creator>
      <dc:date>2013-09-16T13:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH_LDD issue with safe write and FTFE</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/FLASH-LDD-issue-with-safe-write-and-FTFE/m-p/231512#M1210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 18:44:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/FLASH-LDD-issue-with-safe-write-and-FTFE/m-p/231512#M1210</guid>
      <dc:creator>vfilip</dc:creator>
      <dc:date>2013-09-16T18:44:01Z</dc:date>
    </item>
  </channel>
</rss>

