<?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: MPC5777C Flash Crash Problem in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1316726#M18802</link>
    <description>&lt;P&gt;Hi Ada,&lt;/P&gt;
&lt;P&gt;I'm sorry for delayed response, I was out of office last week.&lt;/P&gt;
&lt;P&gt;Enabled cache memory can cause only data incoherence, not ECC errors.&lt;/P&gt;
&lt;P&gt;For example, let's assume this situation - you read some data from flash memory (that means it's loaded to cache at the same time). If you erase that flash block now, the cache is not informed about this operation. So, if you read the cached area now, you will read old content of flash. It's responsibility of user to invalidate the cache in this situation or you can configure that area as cache inhibited.&lt;/P&gt;
&lt;P&gt;There's hardware cache coherency unit on this device but it works only between the cores and DMA.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Mon, 02 Aug 2021 12:45:03 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2021-08-02T12:45:03Z</dc:date>
    <item>
      <title>MPC5777C Flash Crash Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1308722#M18682</link>
      <description>&lt;P&gt;Hi , All&lt;/P&gt;&lt;P&gt;I have the problem about Flash of MPC5777C, when ECU power down,and power on again,the code crashs, I debug the memory view, it shows the data in the memory did not show the value, it shows the "?".&lt;/P&gt;&lt;P&gt;I guess the it may cause by writing Flash,but I read the statue about Flash before the power down, it returns ok, so what should I do to solve the problem?&lt;/P&gt;&lt;P&gt;It does not happen every time,it happens&amp;nbsp;occasionally,&lt;/P&gt;&lt;P&gt;Please help me,thank you.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="flash出错.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149988iB5E8BA06AE9761BC/image-size/large?v=v2&amp;amp;px=999" alt="flash出错.png" title="flash出错.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 01:37:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1308722#M18682</guid>
      <dc:creator>Ada_Lovelace</dc:creator>
      <dc:date>2021-07-16T01:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C Flash Crash Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1308828#M18684</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;this is caused by double bit ECC error. Generally, such error can appear when:&lt;/P&gt;
&lt;P&gt;1. You program a double word which is not fully erased&lt;/P&gt;
&lt;P&gt;2. Erase or program operation is terminated by unexpected reset&lt;/P&gt;
&lt;P&gt;3. Too many erase/program cycles have been performed (see the datasheet for minimal and typical number of cycles).&lt;/P&gt;
&lt;P&gt;In this case, it seems to be the first reason. To recover, it's necessary to erase the flash. To avoid this situation, check if a double word you are going to program is really fully erased.&lt;/P&gt;
&lt;P&gt;And if you are programming the flash in runtime, so there's a risk that device is reset during program/erase operation, it's necessary to handle IVOR1 exception appropriately, so you can erase affected block(s) to recover.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 05:59:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1308828#M18684</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2021-07-16T05:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C Flash Crash Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1308844#M18685</link>
      <description>&lt;P&gt;Hi, Lucas&lt;/P&gt;&lt;P&gt;How to&amp;nbsp;handle IVOR1 exception appropriately? It means that I need to erase flash when it runs into the IVOR1 interrupt?&lt;/P&gt;&lt;P&gt;But&amp;nbsp; I&amp;nbsp; think it works when the ECU power on, the data of the flash will lost, I need the data of the flash when it power on.&lt;/P&gt;&lt;P&gt;Or it has a method to avoid the ECC error, or when&amp;nbsp; the flash writes failed, it can restart writing flash again until the flash finished ,and then&amp;nbsp; power off?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ada&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 06:33:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1308844#M18685</guid>
      <dc:creator>Ada_Lovelace</dc:creator>
      <dc:date>2021-07-16T06:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C Flash Crash Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1309110#M18690</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Ada,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;“&lt;/SPAN&gt;It means that I need to erase flash when it runs into the IVOR1 interrupt?&lt;SPAN&gt;”&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- In short, yes. The best practice is to use special function for reading of data flash blocks which are updated in runtime. If IVOR1 occurs, you can simply check the address of instruction which caused the error (core register MCSRR0). If the address fall withing address range of that function and if it was read bus error on data load (core register MCSR), you know the exception was caused by reading of corrupted data flash. Just set some global flag to inform the function and return from IVOR1 handler. Notice it’s necessary to update return address in MCSRR0 because it still points to instruction which caused the error. If you don’t do that, the instruction would be executed again and the IVOR1 would be triggered again. For more details, take a look at:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN5200.pdf" target="_blank"&gt;https://www.nxp.com/docs/en/application-note/AN5200.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://www.nxp.com/docs/en/application-note-software/AN5200SW.zip" target="_blank"&gt;https://www.nxp.com/docs/en/application-note-software/AN5200SW.zip&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN4648.pdf" target="_blank"&gt;https://www.nxp.com/docs/en/application-note/AN4648.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN13067.pdf" target="_blank"&gt;https://www.nxp.com/docs/en/application-note/AN13067.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;There’s no method that would try to write the flash until it’s successful. This must be solved on application level. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Good idea is to check the data flash after each reset. You can read your data flash blocks word by word to see if there are ECC errors and then take appropriate action (this is application dependent). &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can use DMA for this to save time. In this case no IVOR1 is triggered, but error flag is set in DMA. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Lukas&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 12:07:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1309110#M18690</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2021-07-16T12:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C Flash Crash Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1314204#M18756</link>
      <description>&lt;P&gt;Hi,Lucas&lt;/P&gt;&lt;P&gt;When I met the problem, I do the change about Cache&lt;/P&gt;&lt;P&gt;I write the code when it is init,will it affect the flash ，or cause the ECC error?&lt;/P&gt;&lt;P&gt;I reference the code about&amp;nbsp; AN5191 pdf.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2021-07-28_11-04-02.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/151034i8F654159087AF77B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snipaste_2021-07-28_11-04-02.png" alt="Snipaste_2021-07-28_11-04-02.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Snipaste_2021-07-28_11-04-02.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 03:05:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1314204#M18756</guid>
      <dc:creator>Ada_Lovelace</dc:creator>
      <dc:date>2021-07-28T03:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C Flash Crash Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1316726#M18802</link>
      <description>&lt;P&gt;Hi Ada,&lt;/P&gt;
&lt;P&gt;I'm sorry for delayed response, I was out of office last week.&lt;/P&gt;
&lt;P&gt;Enabled cache memory can cause only data incoherence, not ECC errors.&lt;/P&gt;
&lt;P&gt;For example, let's assume this situation - you read some data from flash memory (that means it's loaded to cache at the same time). If you erase that flash block now, the cache is not informed about this operation. So, if you read the cached area now, you will read old content of flash. It's responsibility of user to invalidate the cache in this situation or you can configure that area as cache inhibited.&lt;/P&gt;
&lt;P&gt;There's hardware cache coherency unit on this device but it works only between the cores and DMA.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 12:45:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1316726#M18802</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2021-08-02T12:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C Flash Crash Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1363078#M19480</link>
      <description>&lt;P&gt;Hi,&lt;SPAN&gt;Lukas&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have solved the problem:&lt;/P&gt;&lt;P&gt;Dcache&amp;nbsp; bit DCWM, I choose&amp;nbsp; copyback mode, it will cause flash error.So I change the mode to&amp;nbsp;writethrough mode,it works.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 08:03:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-Flash-Crash-Problem/m-p/1363078#M19480</guid>
      <dc:creator>Ada_Lovelace</dc:creator>
      <dc:date>2021-10-28T08:03:25Z</dc:date>
    </item>
  </channel>
</rss>

