<?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>MPC5xxxのトピックRe: MPC5746C Flash Initialization Error</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980845#M14809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the&amp;nbsp;same response with example&amp;nbsp;Example_MPC5748G_Overlay_SRAM_Overlay_Flash_config_S32DS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Startup.s in my project and the example&amp;nbsp;are both disabling the SWT. (I stepped through the code initially, so it is working)&lt;/P&gt;&lt;P&gt;;#****************************** Turn off SWTs ********************************&lt;/P&gt;&lt;P&gt;#define DISABLE_SWT0 1 /*Added to ensure SWT0 is disabled. Should not happen anyways. It should just skip to phase 3 */&lt;BR /&gt;#if defined(DISABLE_SWT0)&lt;BR /&gt;;#SWT0&lt;BR /&gt;e_lis r4, 0xFC05&lt;BR /&gt;e_or2i r4, 0x0000&lt;/P&gt;&lt;P&gt;e_li r3, 0xC520&lt;BR /&gt;e_stw r3, 0x10(r4)&lt;/P&gt;&lt;P&gt;e_li r3, 0xD928&lt;BR /&gt;e_stw r3, 0x10(r4)&lt;/P&gt;&lt;P&gt;e_lis r3, 0xFF00&lt;BR /&gt;e_or2i r3, 0x010A&lt;BR /&gt;e_stw r3, 0(r4)&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the break point after a functional reset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just wanted to show you the exact code that I am using.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/95841iD7155812F5F86C5E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;P.S.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;FCU_SHORT, you mean FCCU_SHORT? this device do implement FCCU instead of old FC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Yes. It was a typo&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Mar 2020 16:55:29 GMT</pubDate>
    <dc:creator>cholland</dc:creator>
    <dc:date>2020-03-25T16:55:29Z</dc:date>
    <item>
      <title>MPC5746C Flash Initialization Error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980841#M14805</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;Every time the processor boots up, I get an RGM.DES.B.F_SWT0.RES = 1.&lt;/P&gt;&lt;P&gt;This means that there is/was a Flash Initialization Failure.&lt;/P&gt;&lt;P&gt;I am trying to investigate the problem further.&lt;/P&gt;&lt;P&gt;My problem is that the failure is kind of vague. I don't know what it means exactly.&lt;/P&gt;&lt;P&gt;I am wondering if it is trying to initialize a certain block?&lt;/P&gt;&lt;P&gt;Is there some sort of read/write error?&lt;/P&gt;&lt;P&gt;Would it be in the Initialization script 57xx_flash.ld?&lt;/P&gt;&lt;P&gt;I have seen code out there that does a flash check. It is written for another processor.&lt;/P&gt;&lt;P&gt;Perhaps I could modify it to check the flash on the MPC5746C?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2020 15:16:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980841#M14805</guid>
      <dc:creator>cholland</dc:creator>
      <dc:date>2020-03-18T15:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5746C Flash Initialization Error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980842#M14806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I will try to bring some light into this error.&lt;/P&gt;&lt;P&gt;The flash is initialized during reset sequence (It is complex process)&lt;/P&gt;&lt;P&gt;This is done during rest phase 1:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_12.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/98072iF41AE87825E5D3BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_12.png" alt="pastedImage_12.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The flash initialization is guarded by SWT0 to ensure that it has not been stuck. As user has no possibility to control execution flow during reset sequence.&lt;/P&gt;&lt;P&gt;Now the question is, if you are using your own design of the board or the EVB from NXP.&lt;/P&gt;&lt;P&gt;Because this looks like serious problem with micro or its flash power supply.&lt;/P&gt;&lt;P&gt;Is this seen on more products or just on one?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2020 07:26:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980842#M14806</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2020-03-20T07:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5746C Flash Initialization Error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980843#M14807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad to hear you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an EVB from NXP. (MPC5748G EVB)&lt;/P&gt;&lt;P&gt;It happens on every MPC5746C I try.&lt;/P&gt;&lt;P&gt;I was go to try to investigate it further, because it does seems strange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand the process a bit, but It confuses me.&lt;/P&gt;&lt;P&gt;If I do a&amp;nbsp;Functional Reset with Soft Reset enabled, (RGM.FESS.B.SS_SOFT_FUNC = 1), I get this error every time.&lt;/P&gt;&lt;P&gt;I&amp;nbsp;believe&amp;nbsp;it's supposed to skip to phase 3 of the boot process, but it doesn't seem to work and this happens.&lt;/P&gt;&lt;P&gt;If I just do a plain old (&lt;SPAN&gt;RGM.FESS.B.&lt;/SPAN&gt;SS_FCU_SHORT) functional reset, it skips to phase 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the Soft Reset is a Soft Destructive Reset?&lt;/P&gt;&lt;P&gt;It says Soft Reset is a Destructive Reset in the RGM.DES register. (F_SOFT_DEST)&lt;/P&gt;&lt;P&gt;You mentioned it once in one of your other posts. (To someone else)&lt;/P&gt;&lt;P&gt;So this is what is causing my troubles.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2020 01:50:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980843#M14807</guid>
      <dc:creator>cholland</dc:creator>
      <dc:date>2020-03-25T01:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5746C Flash Initialization Error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980844#M14808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Christopher,&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;I think the Soft Reset is a Soft Destructive Reset?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;There is not such thing as Soft destructive reset. If the reset is destructive, the device starts from reset Phase1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;It says Soft Reset is a Destructive Reset in the RGM.DES register. (F_SOFT_DEST)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is software [SOFT] destructive reset. It is caused by mode transition to mode 0xF&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/103840iCDF8BA065C3B7564/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/103863i643B4D14B880C503/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_6.png" alt="pastedImage_6.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_7.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/103904iD66569ECED914FA1/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_7.png" alt="pastedImage_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;If I do a&amp;nbsp;Functional Reset with Soft Reset enabled, (RGM.FESS.B.SS_SOFT_FUNC = 1), I get this error every time.&lt;/P&gt;&lt;P&gt;I&amp;nbsp;believe&amp;nbsp;it's supposed to skip to phase 3 of the boot process, but it doesn't seem to work and this happens.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Setting FESS[SOFT_FUNC] will do software (triggered by ME module via mode transition to mode 0) functional short reset.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_10.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/103949iFF73DC7980E1FADA/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_10.png" alt="pastedImage_10.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Yes, this will skip reset phase 3. But only on software reset. This means there is no need to initialize flash, as it is in power domain which will not loose power on this kind of reset.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;If I just do a plain old (&lt;SPAN&gt;RGM.FESS.B.&lt;/SPAN&gt;SS_FCU_SHORT) functional reset, it skips to phase 3.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;FCU_SHORT, you mean FCCU_SHORT? this device do implement FCCU instead of old FCU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still, I see no reason for SWT0 to run if the device is reset to phase 3. And personally I never seen flash initialization failure before on NXP evaluation board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to me that it can be real SWT timeout (unhanded in your code). Maybe in some interrupt where you call software reset our SWT will run out and call reset before software reset. It is hard to say.&lt;/P&gt;&lt;P&gt;Try to disable the SWT0 in assembly startup, right after power on reset.&lt;/P&gt;&lt;P&gt;And see if the fault is gone.&lt;/P&gt;&lt;P&gt;Or just run one of our examples, to see if it still persists.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/docs/DOC-329623#MPC5748G" title="https://community.nxp.com/docs/DOC-329623#MPC5748G"&gt;https://community.nxp.com/docs/DOC-329623#MPC5748G&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2020 08:30:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980844#M14808</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2020-03-25T08:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5746C Flash Initialization Error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980845#M14809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the&amp;nbsp;same response with example&amp;nbsp;Example_MPC5748G_Overlay_SRAM_Overlay_Flash_config_S32DS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Startup.s in my project and the example&amp;nbsp;are both disabling the SWT. (I stepped through the code initially, so it is working)&lt;/P&gt;&lt;P&gt;;#****************************** Turn off SWTs ********************************&lt;/P&gt;&lt;P&gt;#define DISABLE_SWT0 1 /*Added to ensure SWT0 is disabled. Should not happen anyways. It should just skip to phase 3 */&lt;BR /&gt;#if defined(DISABLE_SWT0)&lt;BR /&gt;;#SWT0&lt;BR /&gt;e_lis r4, 0xFC05&lt;BR /&gt;e_or2i r4, 0x0000&lt;/P&gt;&lt;P&gt;e_li r3, 0xC520&lt;BR /&gt;e_stw r3, 0x10(r4)&lt;/P&gt;&lt;P&gt;e_li r3, 0xD928&lt;BR /&gt;e_stw r3, 0x10(r4)&lt;/P&gt;&lt;P&gt;e_lis r3, 0xFF00&lt;BR /&gt;e_or2i r3, 0x010A&lt;BR /&gt;e_stw r3, 0(r4)&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the break point after a functional reset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just wanted to show you the exact code that I am using.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/95841iD7155812F5F86C5E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;P.S.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;FCU_SHORT, you mean FCCU_SHORT? this device do implement FCCU instead of old FC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Yes. It was a typo&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2020 16:55:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980845#M14809</guid>
      <dc:creator>cholland</dc:creator>
      <dc:date>2020-03-25T16:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5746C Flash Initialization Error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980846#M14810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;When I execute it from code I will get reset from PHASE3 and no SWT set.&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/101964iD990181FC9153C88/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;&lt;/P&gt;&lt;P&gt;Also when I execute it from debugger I see same behavior.&lt;/P&gt;&lt;P&gt;And I also see the correct source of reset which is SW reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you seeing different reset type DES&amp;nbsp; [F_SWT0] from the one you are triggering.&lt;/P&gt;&lt;P&gt;If you sent me the compiler project I can check it here. Output file is enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another thing is are you clearing the FES and DES registers after reset? So you can always track latest reset source?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 09:33:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980846#M14810</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2020-03-26T09:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5746C Flash Initialization Error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980847#M14811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;gt;&amp;gt;Another thing is are you clearing the FES and DES registers after reset? So you can always track latest reset source?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;No. I was not doing that. When I cleared the FES and DES registers, the issue no longer appears, in the example anyways.&lt;/P&gt;&lt;P&gt;The issue&amp;nbsp;still occurs in my project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;gt;&amp;gt;It seems to me that it can be real SWT timeout (unhanded in your code). Maybe in some interrupt where you call software reset our SWT will &amp;gt;&amp;gt;run out and call reset before software reset. It is hard to say.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Well, back to square 1. I will try to make my project more like the example and see if I can track the issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I'll post back when and if I find anything.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thanks a lot for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Stay safe my friend.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 16:45:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980847#M14811</guid>
      <dc:creator>cholland</dc:creator>
      <dc:date>2020-03-26T16:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5746C Flash Initialization Error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980848#M14812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the problem.&lt;/P&gt;&lt;P&gt;The example doesn't do any peripheral clock generation InitPeriClkGen().&lt;/P&gt;&lt;P&gt;When I remove the function&amp;nbsp;&lt;STRONG&gt;void SYS_InitPeriClkGen(void), &lt;/STRONG&gt;it works fine.&lt;/P&gt;&lt;P&gt;I have tried changing the order of the functions, but it doesn't seem to have any effect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;void SYS_clk_init(void)&lt;/STRONG&gt;&lt;BR /&gt;{&lt;BR /&gt; MC_CGM.AC5_SC.B.SELCTL = 1; //Connect FXOSC to the FMPLL input.&lt;/P&gt;&lt;P&gt;//Set FMPLL to MHz with 16 MHz FXOSC reference.&lt;BR /&gt; PLLDIG.PLLDV.R = 0x06021050; //PREDIV = 1, MFD = 80, RFDPHI = 3, RFDPHI1 = 3&lt;BR /&gt; PLLDIG.PLLFD.R = 0x00000000; //PLL fractional numerators&lt;BR /&gt; PLLDIG.PLLCAL3.R = 0x00004000; //PLL fractional denominator //MFDEN = 1&lt;/P&gt;&lt;P&gt;//Turn on clock sources and select system clock source&lt;BR /&gt; MC_ME.RUN_MC[0].R = 0x001301F2; //Configure RUN0 mode settings with sysclk FMPLL_PHI0 (64 MHz).&lt;BR /&gt; //MC_ME.RUN_MC[0].B.MVRON = 1;&lt;BR /&gt; //MC_ME.RUN_MC[0].B.FLAON = 3;&lt;BR /&gt; //MC_ME.RUN_MC[0].B.SXOSCON = 1;&lt;BR /&gt; //MC_ME.RUN_MC[0].B.SIRCCON = 1&lt;BR /&gt; //MC_ME.RUN_MC[0].B.PLLON = 1;&lt;BR /&gt; //MC_ME.RUN_MC[0].B.FXOSCON = 1;&lt;BR /&gt; //MC_ME.RUN_MC[0].B.FIRCON = 1;&lt;BR /&gt; //MC_ME.RUN_MC[0].B.SYSCLK = 1;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; //Configure the oscillator divided clocks&lt;BR /&gt; SIRC.CTL.R = 0x00000011; //SIRC_DIV_CLK is SIRC divided by 1 (0.128 MHz).&lt;BR /&gt; SIRC.CTL.B.SIRCS = 1; //Should be the only one set. No ideal why they do 0x...11 and get the value they do?&lt;BR /&gt; FIRC.CTL.R = 0x00000011; //FIRC_DIV_CLK is FIRC divided by 1 (16 MHz).&lt;BR /&gt; FIRC.CTL.B.FIRCS = 1; //Should be the only one set. No ideal why they do 0x...11 and get the value they do?&lt;/P&gt;&lt;P&gt;SXOSC.CTL.B.OSCDIV = 0x00; //SXOSC_DIV_CLK is SXOSC divided by 1 (0.032 MHz).&lt;BR /&gt; FXOSC.CTL.B.OSCDIV = 0x00; //FXOSC_DIV_CLK is FXOSC divided by 1 (16 MHz).&lt;/P&gt;&lt;P&gt;MC_ME.RUN_PC[0].R = 0x000000FE; //Enable peripherals to run in all modes&lt;/P&gt;&lt;P&gt;//Mode transition to RUN0 mode:&lt;BR /&gt; MC_ME.MCTL.R = 0x40005AF0; //Enter RUN0 mode &amp;amp; Key&lt;BR /&gt; MC_ME.MCTL.R = 0x4000A50F; //Enter RUN0 mode &amp;amp; Inverted Key&lt;BR /&gt; while(MC_ME.GS.B.S_MTRANS); //Wait for mode transition to complete&lt;BR /&gt; while(MC_ME.GS.B.S_CURRENT_MODE != 0x4); //Verify RUN0 is the current mode&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;void SYS_InitPeriClkGen(void)&lt;/STRONG&gt;&lt;BR /&gt;{&lt;BR /&gt; MC_CGM.SC_DC0.R = 0x80000000; //S160 at system clock divided by 0 (160 MHz).//DE = 1, DIV = 0&lt;BR /&gt;//MC_CGM.SC_DC0.B.DE = 1;&lt;BR /&gt;//MC_CGM.SC_DC0.B.DIV = 0;&lt;/P&gt;&lt;P&gt;MC_CGM.SC_DC1.R = 0x80010000; //S80 at system clock divided by 2 (80 MHz). //DE = 1, DIV = 1&lt;BR /&gt;//MC_CGM.SC_DC1.B.DE = 1;&lt;BR /&gt;//MC_CGM.SC_DC1.B.DIV = 1;&lt;/P&gt;&lt;P&gt;MC_CGM.SC_DC2.R = 0x80030000; //S40 at system clock divided by 4 (40 MHz). //DE = 1, DIV = 3&lt;BR /&gt;//MC_CGM.SC_DC2.B.DE = 1;&lt;BR /&gt;//MC_CGM.SC_DC2.B.DIV = 3;&lt;/P&gt;&lt;P&gt;MC_CGM.SC_DC5.R = 0x01000000; //FS80 at system clock divided by 1 (80 MHz). //DE = 1, DIV = 0&lt;BR /&gt;//MC_CGM.SC_DC5.B.DE = 1;&lt;BR /&gt;//MC_CGM.SC_DC5.B.DIV = 0;&lt;/P&gt;&lt;P&gt;MC_CGM.AC2_SC.R = 0x01000000; //ENET timers use TXD_CLK/RMII_CLK as source (50 MHz). //SELCTL = 1&lt;BR /&gt;//MC_CGM.AC2_SC.B.SELCTL = 1;&lt;/P&gt;&lt;P&gt;MC_CGM.AC3_SC.R = 0x01000000; //HSM TRNG uses FXOSC as source (16 MHz). //SELCTL = 1&lt;BR /&gt;//MC_CGM.AC3_SC.B.SELCTL = 1;&lt;/P&gt;&lt;P&gt;MC_CGM.AC5_SC.R = 0x01000000; //FMPLL uses FXOSC as source (16 MHz). //SELCTL = 1&lt;BR /&gt;//MC_CGM.AC5_SC.B.SELCTL = 1;&lt;/P&gt;&lt;P&gt;MC_CGM.AC6_SC.R = 0x02000000; //CLKOUT0 uses as source PLL_CLKOUT1 (64 MHz.) //SELCTL = 2&lt;BR /&gt;//MC_CGM.AC6_SC.B.SELCTL = 2;&lt;/P&gt;&lt;P&gt;MC_CGM.AC6_DC0.R = 0x80000000; //Divide CLKOUT0 source by 1 (64 MHz).//DE = 1, DIV = 0&lt;BR /&gt;//MC_CGM.AC6_DC0.B.DE = 1;&lt;BR /&gt;//MC_CGM.AC6_DC0.B.DIV = 0;&lt;/P&gt;&lt;P&gt;MC_CGM.AC8_SC.R = 0x00000000; //SPI0 source is F40 (16 MHz). //SELCTL = 0&lt;BR /&gt;//MC_CGM.AC8_SC.B.SELCTL = 0;&lt;/P&gt;&lt;P&gt;MC_CGM.AC9_SC.R = 0x00000000; //FlexCAN0 source is FS80 (16 MHz). //SELCTL = 0&lt;BR /&gt;//MC_CGM.AC9_SC.B.SELCTL = 0;&lt;/P&gt;&lt;P&gt;MC_CGM.CLKOUT1_SC.R = 0x0E000000; //CLKOUT1 uses as source PLL_CLKOUT1 (64 MHz). //SELCTL = 0xE&lt;BR /&gt;//MC_CGM.CLKOUT1_SC.B.SELCTL = 0xE;&lt;/P&gt;&lt;P&gt;MC_CGM.CLKOUT1_DC.R = 0x80000000; //CLKOUT1 uses as source PLL_CLKOUT1 (64 MHz).//DE = 1, DIV = 0&lt;BR /&gt;//MC_CGM.CLKOUT1_DC.B.DE = 1;&lt;BR /&gt;//MC_CGM.CLKOUT1_DC.B.DIV = 0;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2020 00:52:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980848#M14812</guid>
      <dc:creator>cholland</dc:creator>
      <dc:date>2020-03-27T00:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5746C Flash Initialization Error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980849#M14813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As I have said, I never seen before real flash initialization failure on our EVB. So it is SW issue, where your SWT is triggering reset.&lt;/P&gt;&lt;P&gt;Otherwise it will be HW design failure or micro failure which is (very rare).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2020 08:15:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980849#M14813</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2020-03-27T08:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5746C Flash Initialization Error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980850#M14814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Peter,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;I found the problem.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;The example doesn't do any peripheral clock generation InitPeriClkGen().&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;When I remove the function&amp;nbsp;&lt;STRONG style="border: 0px; font-weight: bold; font-size: 14px;"&gt;void SYS_InitPeriClkGen(void),&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;it works fine.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;I have tried changing the order of the functions, but it doesn't seem to have any effect.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Thanks for your help,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold; font-size: 14px;"&gt;void SYS_clk_init(void)&lt;/STRONG&gt;&lt;BR /&gt;{&lt;BR /&gt;MC_CGM.AC5_SC.B.SELCTL = 1; //Connect FXOSC to the FMPLL input.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;//Set FMPLL to MHz with 16 MHz FXOSC reference.&lt;BR /&gt;PLLDIG.PLLDV.R = 0x06021050; //PREDIV = 1, MFD = 80, RFDPHI = 3, RFDPHI1 = 3&lt;BR /&gt;PLLDIG.PLLFD.R = 0x00000000; //PLL fractional numerators&lt;BR /&gt;PLLDIG.PLLCAL3.R = 0x00004000; //PLL fractional denominator //MFDEN = 1&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;//Turn on clock sources and select system clock source&lt;BR /&gt;MC_ME.RUN_MC[0].R = 0x001301F2; //Configure RUN0 mode settings with sysclk FMPLL_PHI0 (64 MHz).&lt;BR /&gt;//MC_ME.RUN_MC[0].B.MVRON = 1;&lt;BR /&gt;//MC_ME.RUN_MC[0].B.FLAON = 3;&lt;BR /&gt;//MC_ME.RUN_MC[0].B.SXOSCON = 1;&lt;BR /&gt;//MC_ME.RUN_MC[0].B.SIRCCON = 1&lt;BR /&gt;//MC_ME.RUN_MC[0].B.PLLON = 1;&lt;BR /&gt;//MC_ME.RUN_MC[0].B.FXOSCON = 1;&lt;BR /&gt;//MC_ME.RUN_MC[0].B.FIRCON = 1;&lt;BR /&gt;//MC_ME.RUN_MC[0].B.SYSCLK = 1;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;BR /&gt;//Configure the oscillator divided clocks&lt;BR /&gt;SIRC.CTL.R = 0x00000011; //SIRC_DIV_CLK is SIRC divided by 1 (0.128 MHz).&lt;BR /&gt;SIRC.CTL.B.SIRCS = 1; //Should be the only one set. No ideal why they do 0x...11 and get the value they do?&lt;BR /&gt;FIRC.CTL.R = 0x00000011; //FIRC_DIV_CLK is FIRC divided by 1 (16 MHz).&lt;BR /&gt;FIRC.CTL.B.FIRCS = 1; //Should be the only one set. No ideal why they do 0x...11 and get the value they do?&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;SXOSC.CTL.B.OSCDIV = 0x00; //SXOSC_DIV_CLK is SXOSC divided by 1 (0.032 MHz).&lt;BR /&gt;FXOSC.CTL.B.OSCDIV = 0x00; //FXOSC_DIV_CLK is FXOSC divided by 1 (16 MHz).&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;MC_ME.RUN_PC[0].R = 0x000000FE; //Enable peripherals to run in all modes&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;//Mode transition to RUN0 mode:&lt;BR /&gt;MC_ME.MCTL.R = 0x40005AF0; //Enter RUN0 mode &amp;amp; Key&lt;BR /&gt;MC_ME.MCTL.R = 0x4000A50F; //Enter RUN0 mode &amp;amp; Inverted Key&lt;BR /&gt;while(MC_ME.GS.B.S_MTRANS); //Wait for mode transition to complete&lt;BR /&gt;while(MC_ME.GS.B.S_CURRENT_MODE != 0x4); //Verify RUN0 is the current mode&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;}&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold; font-size: 14px;"&gt;void SYS_InitPeriClkGen(void)&lt;/STRONG&gt;&lt;BR /&gt;{&lt;BR /&gt;MC_CGM.SC_DC0.R = 0x80000000; //S160 at system clock divided by 0 (160 MHz).//DE = 1, DIV = 0&lt;BR /&gt;//MC_CGM.SC_DC0.B.DE = 1;&lt;BR /&gt;//MC_CGM.SC_DC0.B.DIV = 0;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;MC_CGM.SC_DC1.R = 0x80010000; //S80 at system clock divided by 2 (80 MHz). //DE = 1, DIV = 1&lt;BR /&gt;//MC_CGM.SC_DC1.B.DE = 1;&lt;BR /&gt;//MC_CGM.SC_DC1.B.DIV = 1;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;MC_CGM.SC_DC2.R = 0x80030000; //S40 at system clock divided by 4 (40 MHz). //DE = 1, DIV = 3&lt;BR /&gt;//MC_CGM.SC_DC2.B.DE = 1;&lt;BR /&gt;//MC_CGM.SC_DC2.B.DIV = 3;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;MC_CGM.SC_DC5.R = 0x01000000; //FS80 at system clock divided by 1 (80 MHz). //DE = 1, DIV = 0&lt;BR /&gt;//MC_CGM.SC_DC5.B.DE = 1;&lt;BR /&gt;//MC_CGM.SC_DC5.B.DIV = 0;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;MC_CGM.AC2_SC.R = 0x01000000; //ENET timers use TXD_CLK/RMII_CLK as source (50 MHz). //SELCTL = 1&lt;BR /&gt;//MC_CGM.AC2_SC.B.SELCTL = 1;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;MC_CGM.AC3_SC.R = 0x01000000; //HSM TRNG uses FXOSC as source (16 MHz). //SELCTL = 1&lt;BR /&gt;//MC_CGM.AC3_SC.B.SELCTL = 1;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;MC_CGM.AC5_SC.R = 0x01000000; //FMPLL uses FXOSC as source (16 MHz). //SELCTL = 1&lt;BR /&gt;//MC_CGM.AC5_SC.B.SELCTL = 1;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;MC_CGM.AC6_SC.R = 0x02000000; //CLKOUT0 uses as source PLL_CLKOUT1 (64 MHz.) //SELCTL = 2&lt;BR /&gt;//MC_CGM.AC6_SC.B.SELCTL = 2;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;MC_CGM.AC6_DC0.R = 0x80000000; //Divide CLKOUT0 source by 1 (64 MHz).//DE = 1, DIV = 0&lt;BR /&gt;//MC_CGM.AC6_DC0.B.DE = 1;&lt;BR /&gt;//MC_CGM.AC6_DC0.B.DIV = 0;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;MC_CGM.AC8_SC.R = 0x00000000; //SPI0 source is F40 (16 MHz). //SELCTL = 0&lt;BR /&gt;//MC_CGM.AC8_SC.B.SELCTL = 0;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;MC_CGM.AC9_SC.R = 0x00000000; //FlexCAN0 source is FS80 (16 MHz). //SELCTL = 0&lt;BR /&gt;//MC_CGM.AC9_SC.B.SELCTL = 0;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;MC_CGM.CLKOUT1_SC.R = 0x0E000000; //CLKOUT1 uses as source PLL_CLKOUT1 (64 MHz). //SELCTL = 0xE&lt;BR /&gt;//MC_CGM.CLKOUT1_SC.B.SELCTL = 0xE;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;MC_CGM.CLKOUT1_DC.R = 0x80000000; //CLKOUT1 uses as source PLL_CLKOUT1 (64 MHz).//DE = 1, DIV = 0&lt;BR /&gt;//MC_CGM.CLKOUT1_DC.B.DE = 1;&lt;BR /&gt;//MC_CGM.CLKOUT1_DC.B.DIV = 0;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2020 14:32:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980850#M14814</guid>
      <dc:creator>cholland</dc:creator>
      <dc:date>2020-03-27T14:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5746C Flash Initialization Error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980851#M14815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2020 12:45:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5746C-Flash-Initialization-Error/m-p/980851#M14815</guid>
      <dc:creator>cholland</dc:creator>
      <dc:date>2020-03-31T12:45:18Z</dc:date>
    </item>
  </channel>
</rss>

