<?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: S32K142 SRAM ECC problem in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K142-SRAM-ECC-problem/m-p/915577#M4744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;If I understand, you inject an ECC error on SRAM_L region&amp;nbsp;and the function that does that is located in the SRAM_L region.&amp;nbsp;I guess that the SRAM_L error is detected as soon as the global function is enabled.&lt;/P&gt;&lt;P&gt;Could you place the code into Flash?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;BR, Daniel&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Oct 2019 13:58:10 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2019-10-17T13:58:10Z</dc:date>
    <item>
      <title>S32K142 SRAM ECC problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K142-SRAM-ECC-problem/m-p/915576#M4743</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;My project needs to capture the SRAM&amp;nbsp;non-correctable ECC event when the SRAM is corrupt for function safety. But now I have two problems when I use ERM to implement it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My solution is as follows:&lt;/P&gt;&lt;P&gt;1. Enable the ERM CH0 to capture the &amp;nbsp;SRAM_L non-correctable ECC event;&lt;/P&gt;&lt;P&gt;2. Enable the ERM CH1 to capture the&amp;nbsp; SRAM_U non-correctable ECC event;&lt;/P&gt;&lt;P&gt;3. The vector table is placed in the beginning of&amp;nbsp;SRAM_L(i.e. __flash_vector_table__ is not defined) and some&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; time-critical codes also run in SRAM_L.&amp;nbsp; All the variables are placed in SRAM_U; &amp;nbsp;&lt;/P&gt;&lt;P&gt;4. The EIM is also used to confirm that the ERM is working properly by calling the following function&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ERM_CheckByEIM() every 100ms&amp;nbsp; in which the single error is injected into SRAM_L &amp;amp; SRAM_U by EIM.&lt;/P&gt;&lt;P&gt;5. SCST_Test() from SCST library is called every 100ms;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problems are as follows:&lt;/P&gt;&lt;P&gt;1. Problem 1: The ERM reports that SRAM_L generates the non-correctable ECC event, but SRAM_U is OK;&lt;/P&gt;&lt;P&gt;2. Problem 2: If the ERM CH0 is not enabled for SRAM_L&amp;nbsp;non-correctable ECC event capture and RCM is enabled to delay the s/w reset(The register bits&amp;nbsp; 'SIM-&amp;gt;CHIPCTL.SRAML_RETEN/SRAMU_RETEN' have been set in SystemInit() after MCU reset and cleared in the ISR of RCM), the ERM reports that&amp;nbsp; the SRAM_U has the non-correctable ECC event too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm confused which causes the problems.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*------------------------------------------------------------------------------------------------------------------------*/&lt;/P&gt;&lt;P&gt;SCST_PLACE_IN_SECTION(safety_func_code) // This function is placed in SRAM_L to run.&lt;/P&gt;&lt;P&gt;void ERM_CheckByEIM(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;uint32_t *p;&lt;BR /&gt;&amp;nbsp;volatile uint32_t wReadData, wErrAddr;&lt;BR /&gt;&amp;nbsp;bool bTest1OK = false, bTest2OK = false;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;/*--- Read the the SRAM_L/SRAM_U to see the error. ---*/&lt;BR /&gt;&amp;nbsp;__disable_irq();&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; /* Initialize the EIM for the single error injection. */&lt;BR /&gt;&amp;nbsp;EIM_DRV_Init(INST_EIM0, EIM_CHANNEL_COUNT0, eim1_ChannelConfig0);&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;/* Clear the single error flag of CH0/1 */&lt;BR /&gt;&amp;nbsp;ERM_DRV_ClearEvent(INST_ERM0, 0, ERM_EVENT_SINGLE_BIT);&lt;BR /&gt;&amp;nbsp;ERM_DRV_ClearEvent(INST_ERM0, 1, ERM_EVENT_SINGLE_BIT);&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;/* Read the SRAM_L twice to detect the sigle error by ERM. */&lt;BR /&gt;&amp;nbsp;p = (uint32_t *)0x1FFFFF00;&lt;BR /&gt;&amp;nbsp;wReadData = *p;&lt;BR /&gt;&amp;nbsp;wReadData = *p;&lt;BR /&gt;&amp;nbsp;/* Check the ERM sigle bit error flag to valiate that the ERM is working properly. */&lt;BR /&gt;&amp;nbsp;if (ERM_DRV_GetErrorDetail(INST_ERM0, 0, (uint32_t *)&amp;amp;wErrAddr) == ERM_EVENT_SINGLE_BIT) &lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;if (wErrAddr == 0x1FFFFF00) bTest1OK = true;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;/* Read the SRAM_U twice to detect the sigle error by ERM. */&lt;BR /&gt;&amp;nbsp;p = (uint32_t *)0x20000000;&lt;BR /&gt;&amp;nbsp;wReadData = *p;&lt;BR /&gt;&amp;nbsp;wReadData = *p;&lt;BR /&gt;&amp;nbsp;/* Check the ERM sigle bit error flag to valiate that the ERM is working properly. */&lt;BR /&gt;&amp;nbsp;if (ERM_DRV_GetErrorDetail(INST_ERM0, 1, (uint32_t *)&amp;amp;wErrAddr) == ERM_EVENT_SINGLE_BIT)&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;if (wErrAddr == 0x20000000) bTest2OK = true;&lt;BR /&gt;&amp;nbsp;}&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; /* Clear the single error flag of CH0/1 */&lt;BR /&gt;&amp;nbsp;ERM_DRV_ClearEvent(INST_ERM0, 0, ERM_EVENT_SINGLE_BIT);&lt;BR /&gt;&amp;nbsp;ERM_DRV_ClearEvent(INST_ERM0, 1, ERM_EVENT_SINGLE_BIT);&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;__enable_irq();&lt;BR /&gt;&amp;nbsp;/*----------------------------------------------------*/&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;/* Disable the EIM. */&lt;BR /&gt;&amp;nbsp;EIM_DRV_Deinit(INST_EIM0);&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;/* Reset the MCU if the ERM is not working properly. */&lt;BR /&gt;&amp;nbsp;if ((bTest1OK == false) || (bTest2OK == false)) NVIC_SystemReset(); &amp;nbsp; /* S/W reset */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/*------------------------------------------------------------------------------------------------------------------------*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; BRs,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2019 08:59:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K142-SRAM-ECC-problem/m-p/915576#M4743</guid>
      <dc:creator>davidjiang1973</dc:creator>
      <dc:date>2019-10-14T08:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: S32K142 SRAM ECC problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K142-SRAM-ECC-problem/m-p/915577#M4744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;If I understand, you inject an ECC error on SRAM_L region&amp;nbsp;and the function that does that is located in the SRAM_L region.&amp;nbsp;I guess that the SRAM_L error is detected as soon as the global function is enabled.&lt;/P&gt;&lt;P&gt;Could you place the code into Flash?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;BR, Daniel&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2019 13:58:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K142-SRAM-ECC-problem/m-p/915577#M4744</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2019-10-17T13:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: S32K142 SRAM ECC problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K142-SRAM-ECC-problem/m-p/915578#M4745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your suggestion to place the code of 'ERM_CheckByEIM()' into Flash, but the problem still happened.&lt;/P&gt;&lt;P&gt;It's same even I didn't inject any error by EIM without calling the function ERM_CheckByEIM()''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user manual of S32K142 doesn't talk much about the ECC. So could you list all the factors which can trigger the ECC error of SRAM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; BRs,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2019 23:55:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K142-SRAM-ECC-problem/m-p/915578#M4745</guid>
      <dc:creator>davidjiang1973</dc:creator>
      <dc:date>2019-10-17T23:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: S32K142 SRAM ECC problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K142-SRAM-ECC-problem/m-p/915579#M4746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;ECC errors are detected when the SRAM is read and the data do not match the ECC checksum which is generated and stored while the SRAM is written.&lt;/P&gt;&lt;P&gt;Could you please check the EIM registers, it the injection really disabled?&lt;/P&gt;&lt;P&gt;At which point do you get the SRAM_L ECC error then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;BR, Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2019 09:10:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K142-SRAM-ECC-problem/m-p/915579#M4746</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2019-10-21T09:10:24Z</dc:date>
    </item>
  </channel>
</rss>

