<?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: KL82 switch from HSRUN to RUN in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-switch-from-HSRUN-to-RUN/m-p/1044120#M56853</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A _jive_internal="true" data-userid="319754" data-username="marcwillem" href="https://community.nxp.com/people/marcwillem" style="color: #3d9ce7; background-color: #ffffff; border: 0px; font-weight: 600; text-decoration: none; font-size: 11.9994px;"&gt;marcwillem&lt;/A&gt;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp; Do you check the run mode clock, whether you meet the following requirements:&lt;/SPAN&gt;&lt;/SPAN&gt;&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/107544iEA86CF29346C3B51/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;The HSRUN can change to the RUN mode:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/107583i33AC60D94C54FAC8/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/107624i2FCD3BED8167DB19/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please double-check the above points.&lt;/P&gt;&lt;P&gt;Make sure the core, bus clock meet the requirement, then set PMCTRL[RUNM]=00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; background-color: #ffffff; color: #646464; font-weight: inherit; font-size: 14px; "&gt;&amp;nbsp; &amp;nbsp;Wish it helps you!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; background-color: #ffffff; color: #646464; font-weight: inherit; font-size: 14px; "&gt;&amp;nbsp; &amp;nbsp;If you still have questions about it, please kindly let me know.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; background-color: #ffffff; color: #646464; font-weight: inherit; font-size: 14px; "&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Best Regards,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Kerry&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;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&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;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 May 2020 07:45:18 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2020-05-20T07:45:18Z</dc:date>
    <item>
      <title>KL82 switch from HSRUN to RUN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-switch-from-HSRUN-to-RUN/m-p/1044119#M56852</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;I do have an issue switching from HSRUN mode to RUN mode.&lt;/P&gt;&lt;P&gt;After the configuration of the clocks,&amp;nbsp;CLOCK_GetFllFreq() return 0 and my program is not working.&lt;/P&gt;&lt;P&gt;Although if I start in RUN mode,&amp;nbsp;CLOCK_GetFllFreq() returns the correct value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help me figure out, what I am missing when switching from HSRUN to RUN?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code for RUN&lt;/P&gt;&lt;P&gt;void CLK_RUN(void)&lt;BR /&gt;{&lt;BR /&gt; /* Set the system clock dividers in SIM to safe value. */&lt;BR /&gt; CLOCK_SetSimSafeDivs();&lt;BR /&gt; /* Configure RTC clock including enabling RTC oscillator. */&lt;BR /&gt; CLOCK_CONFIG_SetRtcClock(RTC_OSC_CAP_LOAD_12PF, RTC_RTC32KCLK_PERIPHERALS_ENABLED);&lt;BR /&gt; /* Set MCG to FBI mode. */&lt;BR /&gt; CLOCK_SetInternalRefClkConfig(mcgConfig_CLK_RUN.irclkEnableMode,&lt;BR /&gt; mcgConfig_CLK_RUN.ircs,&lt;BR /&gt; mcgConfig_CLK_RUN.fcrdiv);&lt;BR /&gt;#if FSL_CLOCK_DRIVER_VERSION &amp;gt;= MAKE_VERSION(2, 2, 0)&lt;BR /&gt; CLOCK_SetFbiMode(mcgConfig_CLK_RUN.dmx32,&lt;BR /&gt; mcgConfig_CLK_RUN.drs,&lt;BR /&gt; CLOCK_CONFIG_FllStableDelay);&lt;BR /&gt;#else&lt;BR /&gt; CLOCK_SetFbiMode(mcgConfig_CLK_RUN.drs,&lt;BR /&gt; CLOCK_CONFIG_FllStableDelay);&lt;BR /&gt;#endif&lt;BR /&gt; /* Select the MCG external reference clock. */&lt;BR /&gt; CLOCK_SetExternalRefClkConfig(mcgConfig_CLK_RUN.oscsel);&lt;BR /&gt; /* Set the clock configuration in SIM module. */&lt;BR /&gt; CLOCK_SetSimConfig(&amp;amp;simConfig_CLK_RUN);&lt;BR /&gt; /* Set SystemCoreClock variable. */&lt;BR /&gt; SystemCoreClock = CLK_RUN_CORE_CLOCK;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code for HSRUN&lt;/P&gt;&lt;P&gt;/* Set HSRUN power mode */&lt;BR /&gt; SMC_SetPowerModeProtection(SMC, kSMC_AllowPowerModeAll);&lt;BR /&gt; SMC_SetPowerModeHsrun(SMC);&lt;BR /&gt; while (SMC_GetPowerModeState(SMC) != kSMC_PowerStateHsrun)&lt;BR /&gt; {&lt;BR /&gt; }&lt;BR /&gt; /* Set the system clock dividers in SIM to safe value. */&lt;BR /&gt; CLOCK_SetSimSafeDivs();&lt;BR /&gt; /* Configure RTC clock including enabling RTC oscillator. */&lt;BR /&gt; CLOCK_CONFIG_SetRtcClock(RTC_OSC_CAP_LOAD_12PF, RTC_RTC32KCLK_PERIPHERALS_ENABLED);&lt;BR /&gt; /* Initializes OSC0 according to board configuration. */&lt;BR /&gt; CLOCK_InitOsc0(&amp;amp;oscConfig_CLK_HSRUN);&lt;BR /&gt; CLOCK_SetXtal0Freq(oscConfig_CLK_HSRUN.freq);&lt;BR /&gt; /* Configure FLL external reference divider (FRDIV). */&lt;BR /&gt; CLOCK_CONFIG_SetFllExtRefDiv(mcgConfig_CLK_HSRUN.frdiv);&lt;BR /&gt; /* Set MCG to PEE mode. */&lt;BR /&gt; CLOCK_BootToPeeMode(mcgConfig_CLK_HSRUN.oscsel,&lt;BR /&gt; kMCG_PllClkSelPll0,&lt;BR /&gt; &amp;amp;mcgConfig_CLK_HSRUN.pll0Config);&lt;BR /&gt; /* Set the clock configuration in SIM module. */&lt;BR /&gt; CLOCK_SetSimConfig(&amp;amp;simConfig_CLK_HSRUN);&lt;BR /&gt; /* Set SystemCoreClock variable. */&lt;BR /&gt; SystemCoreClock = CLK_HSRUN_CORE_CLOCK;&lt;BR /&gt; /* Enable USB FS clock. */&lt;BR /&gt; CLOCK_EnableUsbfs0Clock(kCLOCK_UsbSrcPll0, SIM_USB_CLK_96000000HZ);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 20:01:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-switch-from-HSRUN-to-RUN/m-p/1044119#M56852</guid>
      <dc:creator>marcwillem</dc:creator>
      <dc:date>2020-05-19T20:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: KL82 switch from HSRUN to RUN</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-switch-from-HSRUN-to-RUN/m-p/1044120#M56853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A _jive_internal="true" data-userid="319754" data-username="marcwillem" href="https://community.nxp.com/people/marcwillem" style="color: #3d9ce7; background-color: #ffffff; border: 0px; font-weight: 600; text-decoration: none; font-size: 11.9994px;"&gt;marcwillem&lt;/A&gt;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp; Do you check the run mode clock, whether you meet the following requirements:&lt;/SPAN&gt;&lt;/SPAN&gt;&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/107544iEA86CF29346C3B51/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;The HSRUN can change to the RUN mode:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/107583i33AC60D94C54FAC8/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/107624i2FCD3BED8167DB19/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please double-check the above points.&lt;/P&gt;&lt;P&gt;Make sure the core, bus clock meet the requirement, then set PMCTRL[RUNM]=00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; background-color: #ffffff; color: #646464; font-weight: inherit; font-size: 14px; "&gt;&amp;nbsp; &amp;nbsp;Wish it helps you!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; background-color: #ffffff; color: #646464; font-weight: inherit; font-size: 14px; "&gt;&amp;nbsp; &amp;nbsp;If you still have questions about it, please kindly let me know.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; background-color: #ffffff; color: #646464; font-weight: inherit; font-size: 14px; "&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Best Regards,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Kerry&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;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&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;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2020 07:45:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-switch-from-HSRUN-to-RUN/m-p/1044120#M56853</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2020-05-20T07:45:18Z</dc:date>
    </item>
  </channel>
</rss>

