<?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 Machine Check Exception occur with data cache enabled on MPC5746C multi-core project in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1363115#M19482</link>
    <description>&lt;P&gt;Dear NXP team,&lt;/P&gt;&lt;P&gt;I am developing a multi-core project on MPC5746C, instruction cache and data cache of Z4 core is enabled at startup. To avoid cache coherency problem, SMPU is enabled and a region in system RAM is set as cache inhibited for inter-core communication. A machine check exception occurs with MAV/LD/BUS_RDERR set in MCSR, the example code of Z4 core and Z2 core are as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/************************************&lt;/P&gt;&lt;P&gt;&amp;nbsp;* Z4 core Code &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;***********************************/&lt;/P&gt;&lt;P&gt;#pragma ghs section data = ".NONE_CACHE_RAM"&amp;nbsp;&amp;nbsp;&amp;nbsp;/*NONE_CACHE_RAM refers the cache inhibited region of SMPU*/&lt;/P&gt;&lt;P&gt;unsigned int z4_write_var&amp;nbsp;= 1;&lt;/P&gt;&lt;P&gt;#pragma ghs section data = default&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void test_code_z4(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;z4_write_var++;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/************************************&lt;/P&gt;&lt;P&gt;&amp;nbsp;* Z2 core Code &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;***********************************/&lt;/P&gt;&lt;P&gt;extern unsigned int z4_write_var;&lt;/P&gt;&lt;P&gt;unsigned int z2_read_var;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void test_code_z2(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;z2_read_var = z4_write_var;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The running result of the program is that a machine check exception occurs, MAV/LD/BUS_RDERR are set in MCSR, and MCAR indicates the address of z4_write_var, I have checked .map file and I’m sure that z4_write_var locates within the cache inhibit region ".NONE_CACHE_RAM". And I have checked MEMU module, there is nothing indicating an ECC or EDC error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know what is the reason for the exception , and how to deal with it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking forward for a reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards!&lt;/P&gt;&lt;P&gt;Victor&lt;/P&gt;</description>
    <pubDate>Thu, 28 Oct 2021 08:55:44 GMT</pubDate>
    <dc:creator>1045302770</dc:creator>
    <dc:date>2021-10-28T08:55:44Z</dc:date>
    <item>
      <title>Machine Check Exception occur with data cache enabled on MPC5746C multi-core project</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1363115#M19482</link>
      <description>&lt;P&gt;Dear NXP team,&lt;/P&gt;&lt;P&gt;I am developing a multi-core project on MPC5746C, instruction cache and data cache of Z4 core is enabled at startup. To avoid cache coherency problem, SMPU is enabled and a region in system RAM is set as cache inhibited for inter-core communication. A machine check exception occurs with MAV/LD/BUS_RDERR set in MCSR, the example code of Z4 core and Z2 core are as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/************************************&lt;/P&gt;&lt;P&gt;&amp;nbsp;* Z4 core Code &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;***********************************/&lt;/P&gt;&lt;P&gt;#pragma ghs section data = ".NONE_CACHE_RAM"&amp;nbsp;&amp;nbsp;&amp;nbsp;/*NONE_CACHE_RAM refers the cache inhibited region of SMPU*/&lt;/P&gt;&lt;P&gt;unsigned int z4_write_var&amp;nbsp;= 1;&lt;/P&gt;&lt;P&gt;#pragma ghs section data = default&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void test_code_z4(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;z4_write_var++;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/************************************&lt;/P&gt;&lt;P&gt;&amp;nbsp;* Z2 core Code &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;***********************************/&lt;/P&gt;&lt;P&gt;extern unsigned int z4_write_var;&lt;/P&gt;&lt;P&gt;unsigned int z2_read_var;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void test_code_z2(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;z2_read_var = z4_write_var;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The running result of the program is that a machine check exception occurs, MAV/LD/BUS_RDERR are set in MCSR, and MCAR indicates the address of z4_write_var, I have checked .map file and I’m sure that z4_write_var locates within the cache inhibit region ".NONE_CACHE_RAM". And I have checked MEMU module, there is nothing indicating an ECC or EDC error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know what is the reason for the exception , and how to deal with it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking forward for a reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards!&lt;/P&gt;&lt;P&gt;Victor&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 08:55:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1363115#M19482</guid>
      <dc:creator>1045302770</dc:creator>
      <dc:date>2021-10-28T08:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Check Exception occur with data cache enabled on MPC5746C multi-core project</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1363747#M19485</link>
      <description>&lt;P&gt;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795" target="_blank"&gt;@lukaszadrapa&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52613" target="_blank"&gt;@davidtosenovjan&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;Sorry for bothering you, but would you please give me some advice to solve this problem?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 07:51:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1363747#M19485</guid>
      <dc:creator>1045302770</dc:creator>
      <dc:date>2021-10-29T07:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Check Exception occur with data cache enabled on MPC5746C multi-core project</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1363834#M19486</link>
      <description>&lt;P&gt;Hi, in this test case i would say, possible cause be XBAR priority setting&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="davidtosenovjan_0-1635502497901.png" style="width: 608px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/160693i958482C164C1CA4F/image-dimensions/608x390?v=v2" width="608" height="390" role="button" title="davidtosenovjan_0-1635502497901.png" alt="davidtosenovjan_0-1635502497901.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;davidtosenovjan_0-1635502497901.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I would try to use round-robin configuration for both cores. Let me know if it helps or not&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 10:16:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1363834#M19486</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2021-10-29T10:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Check Exception occur with data cache enabled on MPC5746C multi-core project</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1363905#M19488</link>
      <description>&lt;P&gt;Hi, thanks for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to&amp;nbsp;&lt;SPAN&gt;use round-robin configuration, but it doesn't work, the exception still happens. My original XBAR configuration is as followse:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1045302770_0-1635508780887.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/160719iF1DB2883651ABFD4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1045302770_0-1635508780887.png" alt="1045302770_0-1635508780887.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;1045302770_0-1635508780887.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 12:00:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1363905#M19488</guid>
      <dc:creator>1045302770</dc:creator>
      <dc:date>2021-10-29T12:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Check Exception occur with data cache enabled on MPC5746C multi-core project</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1364374#M19493</link>
      <description>&lt;P&gt;Have you checked CMPU setting for second core? Isn't access restricted?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 07:12:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1364374#M19493</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2021-11-01T07:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Check Exception occur with data cache enabled on MPC5746C multi-core project</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1365380#M19505</link>
      <description>I have checked it, the word2 of the NONE_CACHE_RAM memory region is 0xF3FCF000. And the exception occurs after z4_write_var counts for a while and z2_read_var changes normally until the exception occurs.</description>
      <pubDate>Wed, 03 Nov 2021 01:33:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1365380#M19505</guid>
      <dc:creator>1045302770</dc:creator>
      <dc:date>2021-11-03T01:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Check Exception occur with data cache enabled on MPC5746C multi-core project</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1365647#M19511</link>
      <description>&lt;P&gt;Is this error dependent on running of z4 core? If you stop z4, letting only z2 core at run, does it lead in exception as well?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 09:21:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1365647#M19511</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2021-11-03T09:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Check Exception occur with data cache enabled on MPC5746C multi-core project</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1366157#M19519</link>
      <description>&lt;P&gt;&lt;SPAN&gt;If you stop z4, letting only z2 core at run, does it lead in exception as well?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;No, I have tested for minutes, there is no exception.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 00:48:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1366157#M19519</guid>
      <dc:creator>1045302770</dc:creator>
      <dc:date>2021-11-04T00:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Check Exception occur with data cache enabled on MPC5746C multi-core project</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1366172#M19520</link>
      <description>&lt;P&gt;Some additional information, when data cache is disabled or smpu is disabled, no exception occurs.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 01:23:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1366172#M19520</guid>
      <dc:creator>1045302770</dc:creator>
      <dc:date>2021-11-04T01:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Check Exception occur with data cache enabled on MPC5746C multi-core project</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1366524#M19521</link>
      <description>&lt;P&gt;It should not be any difference between disabled cache and access to the SMPU region with cache inhibited attribute. Please check SMPU setting. Btw it is stated that aborted core accesses generate instruction storage (ISI) or data storage (DSI) interrupts, what would fit to described behavior.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 08:22:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1366524#M19521</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2021-11-04T08:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Check Exception occur with data cache enabled on MPC5746C multi-core project</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1370965#M19602</link>
      <description>&lt;P&gt;Sorry, I was on vacation these days. I have checked SMPU setting, there is no overlapping between SMPU regions, and the setting of the NON_CACHE_RAM is as follows:&lt;/P&gt;&lt;P&gt;REG_WRITE32(SMPU_0_RGD7_W2, 0xf3fcf000);&lt;BR /&gt;REG_WRITE32(SMPU_0_RGD7_W3, 0x00000002);&lt;BR /&gt;REG_WRITE32(SMPU_0_RGD7_W4, 0x00000000);&lt;BR /&gt;REG_WRITE32(SMPU_0_RGD7_W5, 0x00000001);&lt;/P&gt;&lt;P&gt;And I don't know what "&lt;SPAN&gt;aborted core accesses&lt;/SPAN&gt;" is, would you please give me some special example.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 01:24:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1370965#M19602</guid>
      <dc:creator>1045302770</dc:creator>
      <dc:date>2021-11-15T01:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Check Exception occur with data cache enabled on MPC5746C multi-core project</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1371223#M19608</link>
      <description>&lt;P&gt;I mean that access can be terminated (aborted) by SMPU. You could investigate SMPU status registers at the time of error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="davidtosenovjan_0-1636969706809.png" style="width: 595px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/162146i9FC0CD1BF77DC8E0/image-dimensions/595x342?v=v2" width="595" height="342" role="button" title="davidtosenovjan_0-1636969706809.png" alt="davidtosenovjan_0-1636969706809.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;davidtosenovjan_0-1636969706809.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 09:49:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1371223#M19608</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2021-11-15T09:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Machine Check Exception occur with data cache enabled on MPC5746C multi-core project</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1375661#M19689</link>
      <description>&lt;P&gt;The Error Status Register of SMPU did not imply any errors.&lt;/P&gt;&lt;P&gt;Does this problem have anything to do with the Store Buffer.&lt;/P&gt;&lt;P&gt;I just tried to disable the store buffer by the following code,&lt;/P&gt;&lt;P&gt;__MTSPR(976,0x00000008)&lt;/P&gt;&lt;P&gt;Then the&amp;nbsp; program runs for 30 minutes with no error, I will test for longer time, I will update the test result to you tomorrow.&lt;/P&gt;&lt;P&gt;Thanks again for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 13:16:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Machine-Check-Exception-occur-with-data-cache-enabled-on/m-p/1375661#M19689</guid>
      <dc:creator>1045302770</dc:creator>
      <dc:date>2021-11-23T13:16:24Z</dc:date>
    </item>
  </channel>
</rss>

