<?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: CRC signature value is different after flash write in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636910#M6160</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Katie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is important to set the seed value in CRC_CSTAT before calculating CRC. If the seed value is different when calculating CRC of the same structure, the result will be also different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/16373i88DBC959558BC151/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt; &lt;/P&gt;&lt;P&gt;By the way, I shared simple example here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-332223"&gt;https://community.nxp.com/docs/DOC-332223&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if this doesn't solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Mar 2017 09:34:06 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2017-03-10T09:34:06Z</dc:date>
    <item>
      <title>CRC signature value is different after flash write</title>
      <link>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636909#M6159</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;I am developing on MPC5746C.&lt;/P&gt;&lt;P&gt;I referred a sample code in below answer and the CRC calculation itself works but I have no idea why the CRC value is different after flash write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is CRC#2 and CRC#8 is different even if the data is same.&lt;/P&gt;&lt;P&gt;I think the only difference is CSTAT(CRC Current Status) value when I had a look at peripheral register in trace32.&lt;/P&gt;&lt;P&gt;But, still I have no idea why it is different.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The init_edma function is passed through but should I initialize something more?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a current process.&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Let's say it is working on already.&lt;/P&gt;&lt;P&gt;1. A certain command for flash write is received.&lt;/P&gt;&lt;P&gt;2. Calculate CRC of all data in the structure except CRC field&lt;/P&gt;&lt;P&gt;3. Save the CRC value into the structure&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;: The data structure includes other information and CRC.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for example,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; typedef struct st_data{&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;uint8_t num;&amp;nbsp;&amp;nbsp;&amp;nbsp;//object to be checked from CRC&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;uint32_t crc;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;SPAN&gt;st_data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Write the data structure including CRC field into flash to store permanently.&lt;/P&gt;&lt;P&gt;5. target reset using trace32&lt;/P&gt;&lt;P&gt;6.&amp;nbsp;Booting&lt;/P&gt;&lt;P&gt;7. Read data from flash and memcpy to the data structure on RAM&lt;/P&gt;&lt;P&gt;8. Calculate CRC data of the data structure (&lt;SPAN&gt;st_data&lt;/SPAN&gt;) except CRC field&lt;/P&gt;&lt;P&gt;9. If the CRC value of #8 is same as "st_data.crc", it means no problem with flash read.&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Katie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 07:49:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636909#M6159</guid>
      <dc:creator>boyeonkim</dc:creator>
      <dc:date>2017-03-09T07:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: CRC signature value is different after flash write</title>
      <link>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636910#M6160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Katie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is important to set the seed value in CRC_CSTAT before calculating CRC. If the seed value is different when calculating CRC of the same structure, the result will be also different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/16373i88DBC959558BC151/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt; &lt;/P&gt;&lt;P&gt;By the way, I shared simple example here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-332223"&gt;https://community.nxp.com/docs/DOC-332223&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if this doesn't solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 09:34:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636910#M6160</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2017-03-10T09:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: CRC signature value is different after flash write</title>
      <link>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636911#M6161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I&amp;nbsp;initialized all related registers as same as your sample code.&lt;/P&gt;&lt;P&gt;Another problem was I put a wrong source address value (pointer's address) on SADDR register.&lt;/P&gt;&lt;P&gt;Then, it works!!&lt;/P&gt;&lt;P&gt;Please make sure your source address value is right with Trace32 if anyone has same problem with me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much, Lukas!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 02:45:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636911#M6161</guid>
      <dc:creator>boyeonkim</dc:creator>
      <dc:date>2017-03-13T02:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: CRC signature value is different after flash write</title>
      <link>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636912#M6162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lukas, I have one more question.&lt;/P&gt;&lt;P&gt;Is there any register to be set&amp;nbsp;or notification if Writing/Reading data&amp;nbsp;itself from flash is failed?&lt;/P&gt;&lt;P&gt;I should prepare for those situation as well for safety.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Katie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 04:24:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636912#M6162</guid>
      <dc:creator>boyeonkim</dc:creator>
      <dc:date>2017-03-13T04:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: CRC signature value is different after flash write</title>
      <link>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636913#M6163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Katie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the flash implements ECC (Error Correcting Code) which repairs single bit errors and reports non-correctable errors. If you access corrupted data then, in case of single bit error, you will get correct(ed) data and, in case of non-correctable error, machine check exception is triggered.&lt;/P&gt;&lt;P&gt;There's an application note for MPC56xx devices:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.nxp.com/assets/documents/data/en/application-notes/AN5200.pdf"&gt;http://www.nxp.com/assets/documents/data/en/application-notes/AN5200.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.nxp.com/assets/documents/data/en/application-notes-software/AN5200SW.zip"&gt;http://www.nxp.com/assets/documents/data/en/application-notes-software/AN5200SW.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;We plan to write something similar for MPC57xx in next months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 11:15:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636913#M6163</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2017-03-13T11:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: CRC signature value is different after flash write</title>
      <link>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636914#M6164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to catch the flash corruption.&lt;/P&gt;&lt;P&gt;Currently, our program is going to be stuck when it tried to read the corrupted flash with memcpy.&lt;/P&gt;&lt;P&gt;According to the application that you shared, there is a register to be set when the flash corruption is occurred.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any updates on application note for MPC57xx ?&lt;/P&gt;&lt;P&gt;Please share the note if it is released.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 May 2017 02:06:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636914#M6164</guid>
      <dc:creator>boyeonkim</dc:creator>
      <dc:date>2017-05-08T02:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: CRC signature value is different after flash write</title>
      <link>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636915#M6165</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;sorry for delay, I was not able to answer all updates...&lt;/P&gt;&lt;P&gt;There are two sample codes for MPC57xx:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-328097"&gt;Example MPC5777C-1b+2b_RAM_ECC_error_injection GHS614&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-333754"&gt;https://community.nxp.com/docs/DOC-333754&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The application note is not available yet due to high workload. I do not expect that it will be available sooner than at the end of this year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 09:49:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/CRC-signature-value-is-different-after-flash-write/m-p/636915#M6165</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2017-05-25T09:49:23Z</dc:date>
    </item>
  </channel>
</rss>

